-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Document the timing at which messages sent to a channel are Dropped #5490
Labels
A-tokio
Area: The main tokio crate
C-feature-request
Category: A feature request.
M-sync
Module: tokio/sync
Comments
fulmicoton
added
A-tokio
Area: The main tokio crate
C-feature-request
Category: A feature request.
labels
Feb 21, 2023
fulmicoton
changed the title
Document the messages sent to a channel are Dropped
Document the timing at which messages sent to a channel are Dropped
Feb 21, 2023
hds
added a commit
that referenced
this issue
Feb 22, 2023
Some users mentioned that the behavior of a channel when the receivers and/or senders are dropped isn't explicitly documented. This change adds wording to the documentation for each channel in the sync module, explaining under which conditions messages in a channel are dropped with respect to dropping the senders and the receivers. Refs: #5490
@fulmicoton I've made some changes to the documentation in the attached PR. Do you think this would have been sufficient if you'd found it during your initial search? |
@hds yes thank you! |
hds
added a commit
that referenced
this issue
Feb 23, 2023
Some users mentioned that the behavior of a channel when the receivers and/or senders are dropped isn't explicitly documented. This change adds wording to the documentation for each channel in the sync module, explaining under which conditions messages in a channel are dropped with respect to dropping the senders and the receivers. Refs: #5490
Great, I'll close the issue then. |
amab8901
pushed a commit
to amab8901/tokio
that referenced
this issue
Feb 27, 2023
Some users mentioned that the behavior of a channel when the receivers and/or senders are dropped isn't explicitly documented. This change adds wording to the documentation for each channel in the sync module, explaining under which conditions messages in a channel are dropped with respect to dropping the senders and the receivers. Refs: tokio-rs#5490
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-tokio
Area: The main tokio crate
C-feature-request
Category: A feature request.
M-sync
Module: tokio/sync
When sending message to a mpsc channel, messages seem dropped when the
Receiver
is dropped.This seems like the most natural behavior, but this is not "goes without saying" situation.
Some alternative library like flume for instance, require all Senders to also be dropped for messages to be dropped.
It would be nice, if this behavior is confirmed, to add that information in the documentation.
The text was updated successfully, but these errors were encountered: