ev_async watcher's callback is never triggering on ev_async_send()
schmorp at schmorp.de
Sun Jun 30 15:41:37 CEST 2013
On Sat, Jun 29, 2013 at 07:35:00PM -0700, trafdev <trafdev at mail.ru> wrote:
> but looks like loop may have multiple watchers of same type as well
> as single watcher may be assigned to multiple loops.
Watchers can only ever be active in one loop at a time. When a watcher
is stopped, though, it's completely detached from the loop, so you could
then assign it to another loop.
> That explains why ev_async_send requires both loop and watcher, this was
> surprise for me...
Yes, it's not so common in event loops, but since libev tries to go for
small size, it doesn't store the loop inside the watcher unless necessary.
The choice of a Deliantra, the free code+content MORPG
-----==- _GNU_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / schmorp at schmorp.de
More information about the libev