Skip to content

Commit

Permalink
Merge #1897
Browse files Browse the repository at this point in the history
1897: Change how IOManager is handling exceptions r=dcoutts a=coot

With this patch `withIOManager` will rethrown the exception thrown when
`LPOVERLAPPED` was null.  This wasn't the case previously which was a mistake.

I also documented better (an experiment a bit more) with one particular case:
why we are not throwing exceptions when the `LPOVERLAPPED` is `NULL` and
`GetQueuedIoCompletionStatus` errored with `ERROR_INVALID_HANDLE`.  I can
reproduce this scenario when we close the iocp's `HANDLE`, but only in some
circumstances e.g. running the same test twice or more.  The first time
`dequeueCompletionPackets` exists cleanly (i.e. `GetQueuedIoCompletionStatus`
errors with `ERROR_ABANDONDED_WAIT_0`) and the next one errors with
`ERROR_INVALID_HANDLE`).  This behaviour is not documented in `MSDN`.

Also label the `IOManager` thread, which is useful for profiling with the
eventlog.

- withIOManager use IOException
- Removed withMaxSuccess from tests
- Label the IOManager thread


Co-authored-by: Marcin Szamotulski <[email protected]>
  • Loading branch information
iohk-bors[bot] and coot authored Apr 4, 2020
2 parents 96e2a50 + 8a1df40 commit fd549a4
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit fd549a4

Please sign in to comment.