xxx_poll callbacks and multiple event loops

Marc Lehmann schmorp at
Sun Nov 6 13:44:45 CET 2011

On Sun, Nov 06, 2011 at 10:58:59AM +0000, Paddy Byers <paddy.byers at> wrote:
> I'm working on some changes to libuv and trying to support multiple event
> loops via a single eio thread pool.

Hmm, multiple event loops in a single thread? What would be the use case
for that?

Or do you plan to also support multiple eio instances, or some other way
to support multiple submitter/processor threads?

> to me that these callbacks should pass some context information which is
> associated with the eio_req that initiated the activity.

One could in theory pass the eio_req itself to the callback, but I am not
sure this will lead anywhere helpful - this will still not make requests
attached to an event loop (whoever calls poll handles the requests).

So since one thread does all the processing anyway, why don't you let that
poll callback handle the event loop thing? There you have the request, and
can use any attached information.

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

More information about the libev mailing list