Question about ev_async and shared state

Rick Taylor rick at
Wed Feb 25 13:23:35 CET 2009

Hi, I might be misreading the trunk source code, but is it true that the asynchronous event handling uses a single global variable for handling asynch events (gotasync in ev.c)?

I understand the use of a pipe to wake up blocking event loops, but having implemented that, why use a global variable to indicate the condition.  Why not pass a more complex message via the pipe (rather than the single int) keeping the notification private to the individual event_loop.

I suppose the same logic could apply to signals, but they are forced to use the default_event_loop, so the point is moot.

I hope I'm not wasting anyone's time and that I haven't missed the point here.

Many thanks

Rick Taylor

More information about the libev mailing list