From: "Toby Douglass" <[EMAIL PROTECTED]>

I'm adding support for IOCP writes.

I've realised, though, that if you issue a write on a socket which
currently has an outstanding reading, when the IOCP completes, you don't
immediately know which operation has completed.

You use two different OVERLAPPED structures. The pointers returned
by GetQueuedCompletionStatus will be different.

The obvious answer is to use select() to check the socket when an IOCP
completes, but that's very awkward, because of the race conditions, for
the other operation could complete in the time between the IOCP complete
and select() and you have multiple threads calling GQCS concurrently.
Locking would be required, which would be Bad.

That's doesn't sound right..., IOCP type progs really shouldn't need select.

RF

--
felix: lightweight threads, HOFs and game scripting.
svn co https://svn.sourceforge.net/svnroot/felix/felix/trunk felix
_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkey.org/mailman/listinfo/libevent-users

Reply via email to