PATCH: Integrating libev with other runloops

Marc Lehmann schmorp at
Sun Oct 24 23:57:50 CEST 2010

On Sun, Oct 24, 2010 at 11:46:16AM -0700, Ryan Dahl <ry at> wrote:
> > Not sure what you mean, but not all backends have an fd, and not all
> > who do work in the way you would need it. Libev tells you that it is
> > ready to poll (and the kernel state is updated) when it calls the release
> > callback - no need to expose an internal number that might or might not be
> > relevant, depending on the backend.
> What if the new feature provided a special pipe for backends which do
> not have an FD or do not have an FD which could be polled upon?
> (Obviously it would be necessary for this pipe to not exist when the
> feature was turned off.)

How you communicate between your threads is up to you. A pipe is common, and
libev uses that unless it has eventfd support.

However, this is something the embedding library has to provide (for
example libev supports ev_async watchers which cna be sued to embed other
loops), and not libev.

i.e. you can always run your own pipe for that.

                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_    
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at
      -=====/_/_//_/\_,_/ /_/\_\

More information about the libev mailing list