On Tue, Nov 22, 2011 at 12:01 PM, Marc Lehmann <[email protected]> wrote: > On Mon, Nov 21, 2011 at 10:11:40PM +0100, Zsbán Ambrus <[email protected]> > wrote: >> believe), eventfd is not supported. I think this implementation can >> block if the pipe is full, which could happen eg. if you are calling >> ev_async_send many times (even on different ev_async watchers). In > > the pipe is non-blocking, so it will not block even in this very unlikely > case.
Ah, the fd_intern function does that. I missed that when reading the code. > even in released versions this write is guarded by a flag, and usually not > done more than once per event-loop iteration. > the old flag implementation worked because it was just an optimisation. > the new dual-flag needs memory barriers (well, not on existing x86 cpus, > but libev provides the barriers just in case) for correctness. Thank you. That answers both the original question and my worries. Ambrus _______________________________________________ libev mailing list [email protected] http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev
