Does an event loop support multiple threads?

Hassink, Brian Brian.Hassink at
Tue May 22 20:32:08 CEST 2012

I just asked a similar question on the libevent mailing list and was told that it currently does not.  I understand libev is modeled on libevent, but thought I'd ask here as well...

I'm new to libevent / libev and trying to learn some more about them for potential use in a project.  I've worked with ACE reactor and ASIO proactor in the past, and after briefly skimming online documentation and examples, am wondering about multi-threaded support.

The project I'm working on involves up to 2000 "active" connections.  My initial thought was that the associated read and write events would be pending in the same event_base / ev_loop instance, and that a thread pool would be used to handle them concurrently.  Would I have each thread in the pool invoke event_base_dispatch() / ev_run() with the same event_base / ev_loop instance?

Brian Hassink
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the libev mailing list