ev_run() might exit even when ev_pending_count() > 0
Marc Lehmann
schmorp at schmorp.de
Sun May 6 15:16:11 CEST 2012
On Sat, May 05, 2012 at 02:52:31PM +0400, Denis Bilenko <denis.bilenko at gmail.com> wrote:
> It is currently possible for this to happen:
>
> ev_run(&loop, 0); // exits naturally (that is, without being
> interrupted with ev_break())
> assert(ev_pending_count() == 0); // FAILS, ev_pending_count() is positive.
Hi, can you check out current CVS?
(cvs -z3 -d :pserver:anonymous at cvs.schmorp.de/schmorpforge co libev)
That version should execute queued higher priority watchers in proper order
(that is, when you queue a higher priroity watcher form a lower-priority
watcher callback the next watcher to be executed will be the higher-priority
one)
That should solve your original problem as a side-effect.
--
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