exposing activecnt
Marc Lehmann
schmorp at schmorp.de
Wed Nov 24 23:11:54 CET 2010
On Wed, Nov 24, 2010 at 02:23:45PM +0100, Zsbán Ambrus <ambrus at math.bme.hu> wrote:
> On Wed, Nov 24, 2010 at 1:34 PM, Marc Lehmann <schmorp at schmorp.de> wrote:
>
> That much works. But now suppose Ryan's program calls some finalizer,
> and possibly wants to know whether there are active watchers after
> that. He can recall ev_run, but does ev have a way of telling you
> whether it's returned immediately because there are no watchers?
ev_run returns only when he calls ev_break OR when activecnt is zero, both
events visible to him already.
at most he has to keep an extra flag whether he called ev_break, but note
that his example program already maintains an extra flag, so likely this
can be solved with no extra code.
--
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
mailing list