if there's ever time...IOCP possible?

Marc Lehmann schmorp at schmorp.de
Thu Nov 13 08:33:12 CET 2008

On Wed, Nov 12, 2008 at 01:17:46PM -0700, Roger Pack <rogerpack2005 at gmail.com> wrote:
> I wonder if it would be possible to add IOCP (to emulate event driven
> architectures) to libev.

No, it isn't - iocp's are not powerful enough to emulate the posix event

> http://www.eggheadcafe.com/software/aspnet/32292639/integrate-windows-io-com.aspx
> seems to explain how.

the problem is that the famous "passing in a zero byte buffer" trick a)
isn't supported by the windows api and b) often fails in practise.

besides, performance with a medium number of file handles is likely to be
much better with select (or the new wsapoll).

with a higher number of handles, iocps would (if possible) perform better.

the job of libev is to support the posix model on windows, so programs can be
ported well, at a performance cost because of the extremely braindamaged and
windows api.

the goal is to be compatible, not to have windows-specific hacks that
complicate libev user programs.

besides, there is no point in wasting ten times the amount of code in
getting marginally better performance for that platform.

> Twould be nice to have a mechanism in win32 to overcome the FD_SETSIZE
> limitation.

There is, it's called #define?

If you had read the libev documentation, as you were told a number of
times already, you'd know about that.

> Here's to wishing :)
> Thoughts?

I wish people would search the list archives and read the manual first.

                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 mailing list