-
-
Couldn't load subscription status.
- Fork 2.8k
sync: close the broadcast::Sender in broadcast::Sender::new()
#7629
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
sync: close the broadcast::Sender in broadcast::Sender::new()
#7629
Conversation
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.
Thanks.
6a9bf27 to
3d3b8f4
Compare
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.
@martin-g Could you sync the changes from the base branch to fix the CI failures?
…closed Sender::closed() should return Poll::Ready() if there are no receivers for this channel
3d3b8f4 to
6398d6e
Compare
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.
Thanks!
broadcast::Sender::new()
broadcast::Sender::new()broadcast::Sender by default in broadcast::Sender::new()
broadcast::Sender by default in broadcast::Sender::new()broadcast::Sender in broadcast::Sender::new()
…kio-rs#7629) (cherry picked from commit 6d1ae62)
…kio-rs#7629) (cherry picked from commit 6d1ae62)
…kio-rs#7629) (cherry picked from commit 6d1ae62)
) (cherry picked from commit 6d1ae62)
Motivation
tokio::sync::broadcast::Sender::closed() should return Poll::Ready if there are no receivers for the channel.
A newly created Sender with
Sender::new()currently returns Poll::Pending although there are no receivers for it.Solution
Initialize Tail::closed with
receivers_count == 0