a demo code considering if ev_async event missing

Zsbán Ambrus ambrus at math.bme.hu
Tue Jul 3 19:17:10 CEST 2012

On 7/3/12, debuguo <wateraworld at gmail.com> wrote:
> I wrote a demo code, to find out if there was ev_async event missing
> when ev_async_send called in diffrent thread.
> I add 2 counter, one in the function which would call ev_async_send,
> the other in async_callback.

I think the problem is that one thread sometimes calls ev_async_send
multiple times before the other has a chance to handle the async
event.  In that case, the async callback will get invoked only once,
so the counter for that is incremented only once, whereas the counter
for the timer event is incremented multiple times.


More information about the libev mailing list