IO completion ports need to be signaled when async IO completes. This can be done by the user manually calling PostQueuedCompletionStatus or the OS automatically doing this when async IO completes. How does the OS automatically do this and on which thread? How exactly does the communication between the disk drive and the OS work in this scenario?
I tried setting a breakpoint on PostQueuedCompletionStatus in visual studio when debugging a call to FileStream.ReadAsync, but that was never hit.
As Harry pointed out, the queuing of IO completion events is handled by the windows kernel. When IO completes, the disk sends an interrupt that is handled by the OS. The OS handler presumably enqueues the completion message to the appropriate IOCP.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments