Skip to content
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

Make send and associated send_* functions async #191

Open
udoprog opened this issue Dec 29, 2019 · 0 comments
Open

Make send and associated send_* functions async #191

udoprog opened this issue Dec 29, 2019 · 0 comments

Comments

@udoprog
Copy link
Contributor

udoprog commented Dec 29, 2019

We currently (upcoming 0.14) have a Sender which uses an unbounded channel for outgoing messages. This doesn't provide any back pressure to the send function in case we are unable to process the messages quickly enough, possibly leading to OOM conditions.

A fairly straight forward way to solve this would be to limit the buffer size of the channel (See buffer indocumentation). This does mean that the sender needs to use send and .await over it as appropriate, requiring all send-related functions to be async This would mean an impactful API overhaul, but it would in my view be worthwhile.

@udoprog udoprog changed the title Make send and associated functions async functions Make send and associated send_* functions async Dec 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants