On Tue, Jun 26, 2012 at 12:00:57PM +0200, Marek wrote:
> Now my question is if the flow->B_notify() will end only after the
> iterate_cb() function returns (so the iterate_cb will be running
> with mutex still locked!)? Or rather flow->B_notify() is called,
> inside the B_notify the watcher is triggered (but the callback
> doesn't launch), B_notify() returns,the mutex is unlocked and only
> after that libev runs iterate_cb as a this->async_watcher callback ?

The latter, it returns instantly (the callback is delayed).  Quoting the
documentation:

> ev_async_send (loop, ev_async *): […] feeds an EV_ASYNC event on the watcher
> into the event loop, and instantly returns.
    
<http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#Watcher_Specific_Functions_and_Data_-12>

Best regards,
-- 
Gabriel

_______________________________________________
libev mailing list
libev@lists.schmorp.de
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev

Reply via email to