When an operation failed, the blocking consume methods dropped its completion and only reported the `Errno`. The caller could not tell which request failed, since the `context` was lost. This breaks any user that matches completions to requests.
This PR makes `blockingConsumeCompletions` pass the completion of a failed operation together with its error. Errors of the ring itself, such as `.timeout`, are still passed without a completion. Additionally, `blockingConsumeCompletion(timeout:)` now returns the completion of a failed operation instead of throwing. It only throws errors of the ring itself.
I also added `Completion.error`, which is `nil` on success and the decoded `Errno` otherwise to make it easy to get to the error of a completion.
Fixes#364Fixes#395
To observe events on file descriptors IO_URING supports the `pollAdd` operation. This is useful when you want to observe a file descriptor becoming ready to read or write
This PR adds a new `IORing.Request.PollEvents` option set to model the poll masks. Furthermore, it adds a new `static func pollAdd` to the `IORing.Request`.
We can now use IO_URING to poll for events on file descriptors.