-
Notifications
You must be signed in to change notification settings - Fork 638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement a NIOAsyncWriter
#2251
Merged
Merged
Commits on Sep 20, 2022
-
# Motivation We previously added the `NIOAsyncProducer` to bridge between the NIO channel pipeline and the asynchronous world. However, we still need something to bridge writes from the asynchronous world back to the NIO channel pipeline. # Modification This PR adds a new `NIOAsyncWriter` type that allows us to asynchronously `yield` elements to it. On the other side, we can register a `NIOAsyncWriterDelegate` which will get informed about any written elements. Furthermore, the synchronous side can toggle the writability of the `AsyncWriter` which allows it to implement flow control. A main goal of this type is to be as performant as possible. To achieve this I did the following things: - Make everything generic and inlinable - Use a class with a lock instead of an actor - Provide methods to yield a sequence of things which allows users to reduce the amount of times the lock gets acquired. # Result We now have the means to bridge writes from the asynchronous world to the synchronous
Configuration menu - View commit details
-
Copy full SHA for bf469b1 - Browse repository at this point
Copy the full SHA bf469b1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3d22230 - Browse repository at this point
Copy the full SHA 3d22230View commit details -
Configuration menu - View commit details
-
Copy full SHA for d64143d - Browse repository at this point
Copy the full SHA d64143dView commit details -
Configuration menu - View commit details
-
Copy full SHA for eed945a - Browse repository at this point
Copy the full SHA eed945aView commit details -
Move to holding the lock around the delegate and moved the delegate i…
…nto the state machine
Configuration menu - View commit details
-
Copy full SHA for b66a70c - Browse repository at this point
Copy the full SHA b66a70cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 07f2faf - Browse repository at this point
Copy the full SHA 07f2fafView commit details -
Configuration menu - View commit details
-
Copy full SHA for 64ec5cc - Browse repository at this point
Copy the full SHA 64ec5ccView commit details -
Configuration menu - View commit details
-
Copy full SHA for bef958c - Browse repository at this point
Copy the full SHA bef958cView commit details -
Refactor the writer to only yield Deques and rename the delegate to N…
…IOAsyncWriterSinkDelegate
Configuration menu - View commit details
-
Copy full SHA for 031cff3 - Browse repository at this point
Copy the full SHA 031cff3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7d3e7fa - Browse repository at this point
Copy the full SHA 7d3e7faView commit details -
Configuration menu - View commit details
-
Copy full SHA for 90f2b39 - Browse repository at this point
Copy the full SHA 90f2b39View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7aeeaa5 - Browse repository at this point
Copy the full SHA 7aeeaa5View commit details
Commits on Sep 21, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 627db1a - Browse repository at this point
Copy the full SHA 627db1aView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.