-
Notifications
You must be signed in to change notification settings - Fork 0
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
update backpressure #231
update backpressure #231
Conversation
… dev_connection * 'dev_connection' of github.com:open-web3-stack/boka: try ubuntu-24.04 try different runner image
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
@@ -126,7 +129,63 @@ final class Stream<Handler: StreamHandler>: Sendable, StreamProtocol { | |||
} | |||
if !channel.syncSend(data) { | |||
logger.warning("stream \(id) is full") | |||
// TODO: backpressure handling | |||
receiveData.write { receiveData in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the receive order can still be wrong (and need some tests to verify this case:
- receive data1, unable to send to append to
receivedData
- receive data2, actually able to send, and sent it
- after sleep, sending data1
now the receiver received data2, and data1, which is wrong
No description provided.