-
Notifications
You must be signed in to change notification settings - Fork 629
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
mpsc::Sender should provide a way to check if a send will succeed #256
Comments
I propose |
We likely want to add this in the form of a |
Try_send doesn't satisfy the original issue which wants a way to know if the channel can accept a value before generating it. |
Being able to check before generating will (probably) be an important feature to correctly implement Service backpressure. |
Ah sorry yes right, forgot about that! |
This is resolved by |
In some cases, it would be very helpful to be able to check if the
Sender
will be able to accept a new value before "generating" this value. Right now, usingSender
always requires an extra "buffer" slot to accept values that are rejected. However, theSender
knows if it can accept another value...This applies to a number of other
Sink
implementors as well.The text was updated successfully, but these errors were encountered: