aio in win32 .. how?
Andreas Raab
andreas.raab at gmx.de
Fri Dec 12 15:20:08 UTC 2003
> Are you loving this API yet? grrr.. :-)
That's one of the reason why I prefer to just fire off another thread which
does the operation synchronously ;-)
> I have had a quick look at the SM card for aio and it seems
> (on the face of it) that you could do the notfication stuff
> using a windows event object to get signalled when the async
> operation is complete. You would need a windows thread to go
> to sleep on the event object, however, but that's details I guess.
Very important details though. For example, I had considered switching to
events in the socket code and have the main thread wait on those in
MsgWaitForMultipleObjects (or whatever it's called today) but it turns out
that there's a significant shortcoming in that function - it fails if
invoked with more than 64 objects to wait on. So this would require
splitting up the waits into separate sub-threads (each dealing with 64 event
objects) and then synchronize those. Geesh, what a mess. So by my figuring
the easiest solution is just to fire off a thread for each op.
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|