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 broadcast::Receiver cooperative #6855

Closed
mox692 opened this issue Sep 21, 2024 · 2 comments · Fixed by #6870
Closed

make broadcast::Receiver cooperative #6855

mox692 opened this issue Sep 21, 2024 · 2 comments · Fixed by #6870
Labels
A-tokio Area: The main tokio crate M-coop Module: tokio/coop M-sync Module: tokio/sync

Comments

@mox692
Copy link
Member

mox692 commented Sep 21, 2024

Currently, broadcast::Receiver does not participate in the coop budget, so if there are a lot of messages available, a task will just keep receiving them and runtime may not be able to schedule other tasks.

So, it would make sense to have broadcast::Receiver participate in the coop budget as well.

@mox692 mox692 added A-tokio Area: The main tokio crate M-sync Module: tokio/sync M-coop Module: tokio/coop labels Sep 21, 2024
@tglane
Copy link
Contributor

tglane commented Sep 21, 2024

Are you already working on this? If not I could implement it as well since I already did something similar for the watch::Receiver here.

@mox692
Copy link
Member Author

mox692 commented Sep 21, 2024

Thanks, that sounds good.

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 M-coop Module: tokio/coop M-sync Module: tokio/sync
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants