[Mono-devel-list] PATCH: reworked async IO for Socket
Gonzalo Paniagua Javier
gonzalo at ximian.com
Fri Apr 8 18:04:56 EDT 2005
On Fri, 2005-04-08 at 15:22 -0400, Gonzalo Paniagua Javier wrote:
> For windows, well, patches for using its asynch. IO functions are
> welcome :).
> For the rest, aio_(read|write) are not always available and/or
> SIGEV_THREAD does not work. Even when SIGEV_THREAD works, the thread
> that calls the callback function will be killed if the callback takes
> "too much" time, which is not much. So we had to use another thread to
> actually invoke the managed callback (and the thread has to be from the
> threadpool, to behave like MS).
> The code that we have right does not have any performance issue and
> works on any system that have select(). And we are just 'wasting' one
> thread for polling on all the sockets with ongoing async. operations.
Miguel told me that the performance issue will appear when, say,
thousands of sockets have to be passed to/from kernel/user space.
I removed the old (not enabled by default) code that used aio_* and
cleaned up everything related to AIO for sockets. Right now it's much
simpler to plug aio_* as I'm not trying to mimic windows API functions
and I already delat with the caveats before so this means that once
other issues with higher priorities get out of my TODO list, aio_* will
be added and used when available and working.
More information about the Mono-devel-list