What about the following idea:
Instead of doing an explicit immediate IO operation in e.g. ReadFile(), que an asynchronous request by calling ReadFileEx() as if no data were available. Then issue a
WaitForSingleObject (overlapped->hEvent, 0) /* zero timeout ! */
to see if the request can be handled immediately. Apart from preserving request order, this would also ensure that previous async requests are actually scheduled.
Opinions?
Martin