On Wed, Nov 24, 2010 at 02:23:45PM +0100, Zsbán Ambrus <[email protected]> 
wrote:
> On Wed, Nov 24, 2010 at 1:34 PM, Marc Lehmann <[email protected]> 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
      --==---/ / _ \/ // /\ \/ /      [email protected]
      -=====/_/_//_/\_,_/ /_/\_\

_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev

Reply via email to