ev_ref, the other way round
schmorp at schmorp.de
Tue Jun 23 00:53:07 CEST 2009
On Tue, Jun 23, 2009 at 12:04:15AM +0200, Gabriel Kerneis <kerneis at pps.jussieu.fr> wrote:
> You can check:
It makes me happy to see more use of cooperative threading (not just
by you), after all these years of threads-are-good-for-multiprocessing
misinformation coming mostly from the java side :)
> > (which will keep the loop alive), in which case you wouldn't really need
> > additional references too.
> I just wanted to know if a loop with an async watcher (and nothing else)
> will busy wait (using 100% of the CPU) or "sleep" in some way until it
> is woken up (using 0% of the CPU).
ev_loop should never busy-wait, and ev_loop should never return instantly
when there are active watchers but no events pending.
> > Well, libev cannot work without external functions and datatypes. If you mean
> > the header file, I cannot guarantee that you will be able to switch it off
> > (inttypes.h is a good candidate).
> I mean anything that includes features.h in the glic, since it prevents
> my users to use the _GNU_SOURCE macro in a simple way (for tricky
Sounds more like a bug in the code of those users to me (_GNU_SOURCE
is a reserved macro name, and ev.h can be included regardless of how
_GNU_SOURCE is defined).
The choice of a Deliantra, the free code+content MORPG
-----==- _GNU_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / pcg at goof.com
More information about the libev