-
Notifications
You must be signed in to change notification settings - Fork 654
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NIOAsyncWriter: Fix suspending yield when writer is finished (#3044)
This fixes hitting the following preconditionFailure in NIOAsyncWriter: "This should have already been handled by `yield()`". It doesn't expect a yield to be suspended when the state is `.writerFinished`, but this can definitely happen. This seemed to be the correct solution to me, but please check it carefully, because I'm unfamiliar with this code. I'm not happy about the test for this. It's blocking the `didYield` call for a while, to make sure the correct state is reached. See also the 'FIXME' line. What would be a better way to do this? --------- Co-authored-by: Cory Benfield <[email protected]>
- Loading branch information
Showing
2 changed files
with
78 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters