[Libevent-users] Add support for WINDOWS Overlapped IO

Niels Provos provos at citi.umich.edu
Sun Dec 10 18:49:18 EST 2006


There are many different ways to integrate a non-blocking IO model
into multi-threaded applications.  You can run different event loops
per thread.  You can dispatch work based on event notifications to
worker threads, etc.

It's not possible to write a high-performance network server without
an abstraction like that.  Please, think about that before flaming.

Niels.

On 12/10/06, Steven Grimm <sgrimm at facebook.com> wrote:
> Toby Douglass wrote:
> > Single-thread event-driven seems to me to basically mean state
> > machine.  State machines are wonderful things for achieving simple,
> > bug-free code, but they have a cost; they are implicitly
> > single-threaded.  This can mean you cannot use them in some
> > situations, because you will inherently block whenever you perform work.
>
> That's not strictly true; you can, for example, have multiple state
> machines running concurrently (the implementation strategy I used when I
> added thread support to memcached). Or you can have a single thread
> responsible for I/O operations that hands work off to other threads that
> perform whatever blocking operations they need. Or you can combine the
> two and have a small set of I/O management threads and a larger set of
> worker threads.
>
> The right strategy depends on the particulars of the application, of course.
>
> -Steve
> _______________________________________________
> Libevent-users mailing list
> Libevent-users at monkey.org
> http://monkey.org/mailman/listinfo/libevent-users
>
>


More information about the Libevent-users mailing list