Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recognize ERROR_INVALID_HANDLE as indicating the IOCP was closed
There's a race condition when we signal the IOCP thread to exit by closing the IOCP: the thread might be blocked in GetQueuedCompletionStatusEx, or it might (rarely) be in the rest of the loop. The effect of this is that there are two possible error messages we might get that both indicate that the IOCP was closed. Before we were only detecting one of them; now we detect both. This has the side-effect of making it so that during the test suite we deterministically only take the regular-exit path, rather than sometimes taking the blow-up-on-unrecognized-error path. Which is good because codecov was getting cranky about that non-deterministic coverage and yelling at people for no reason (see python-triogh-81).
- Loading branch information