[Mono-devel-list] PATCH: reworked async IO for Socket

Gonzalo Paniagua Javier gonzalo at ximian.com
Tue Apr 12 18:28:29 EDT 2005

On Tue, 2005-04-12 at 06:49 +0100, James Mansion wrote:
> >Anyway, I'll do the aio_* thing and add epoll and kqueue with the lowest
> >priority to my "queue". Patches for these are welcome.
> My understanding is that the behaviour of aio with sockets
> (and presumably pipes) is NOT (well) specified by POSIX.
> And that the implementations reflect this in their lack of
> dependability for this task.

Indeed. In the previous aio_* based implementation (was disabled by
default) I didn't get to test with non-blocking sockets. Today while
testing I had to decide whether to set the blocking status before
calling aio_* or disregard the patch. I ended up throwing away the patch
(and overwriting it by accident :).

Instead I implemented epoll support (in SVN HEAD now) that works pretty
well and had no caveats apart from the manual page not being updated.

> Certainly as suggested you might ask Mr Provos if you can
> import libevent and then just have an IOCP implementation
> for Win32.

The license of libevent allows doing that, but the code in
WIN32-Code/win32.c is using select(), not IOCP. I prefer waiting for
someone interested on it to provide a patch. By now this is the lowest
level item in my TODO list ;-).

Thanks for your input.


More information about the Mono-devel-list mailing list