Win32 internals question: is the kernel assumed to increment the reference count of a HANDLE during overlapped I/O, such that the "correct" time to CloseHandle is after all I/O is _issued_ rather than completed? Or is it not incremented, so the CloseHandle must be deferred?
-
-
Replying to @cmuratori
You will need to defer the CloseHandle. If you close the handle before the I/O operation is completed, you will receive the error "ERROR_OPERATION_ABORTED".
1 reply 0 retweets 0 likes -
Replying to @LaurentDufresne
Are you sure?
@_knutaf seems to disagree...2 replies 0 retweets 0 likes -
Replying to @cmuratori @_knutaf
I think he was talking about the event handle in the OVERLAPPED structure in which case I have no idea.
1 reply 0 retweets 0 likes -
Replying to @LaurentDufresne @cmuratori
no, I think you're right here. I looked at the code behind CloseHandle, and now I think all pending IO on the file get canceled when the handle is closed by the application. Dang
1 reply 0 retweets 0 likes -
apparently 10 minutes of code searching is not enough for this much code. sorry about that. :P
1 reply 0 retweets 0 likes
No worries - we can now go back to assuming that the API does the wrong thing in most cases :)
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.