-
Notifications
You must be signed in to change notification settings - Fork 100
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
Sends seem to be buffered #246
Comments
This behavior is In short this crate make it so that the Therefore the only time messages can be sent is at the start of the next loop iteration (it will then send as many messages as possible without any waiting in between). Hence the behavior you see. Therefore the solution would be to separate the Outgoing prior to making the stream (with the I personally believe that sends should just send the message through the network connection instead of using such a scheme but there probably is a reason not to do that here... (might be historical though) |
I wonder whether the synchronous API in version 0.13 would work for this. (I imagine one would be giving up something by using 0.13 rather than 0.15, but I don't remember what.) |
The design is definitely historical, and I'd welcome PRs looking to fix it. It might be something I look at myself if I can find the time, as well. |
Might be a noob question, I'm learning Rust.
When using
tokio::time::sleep
to delay each send_privmsg, it sends them all at once instead of sending one, then delaying, then sending one, etc.Here is a reporducing example, where you can see all message got sent at once after waiting for 5 seconds.
The text was updated successfully, but these errors were encountered: