On 5/10/07, beyondkaoru <[EMAIL PROTECTED]> wrote:
will callbacks from events ever interrupt each other? if i have a socket which gets data, so its event handler starts running the function i told it to, and data comes in on another socket, can i be sure that the second event's function won't start until the first one is finished? or would i have to introduce mutexes and/or semaphores?
Libevent is inherently single-threaded, so it cannot preempt other code that is running. Another callback will be issued only after you return from the callback, returning control to the event library. The fact that you don't have to worry about synchronization is one of the main reasons for using asynchronous I/O over individual threads. _______________________________________________ Libevent-users mailing list Libevent-users@monkey.org http://monkey.org/mailman/listinfo/libevent-users