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

Add same_channel for broadcast channel #5602

Closed
Darksonn opened this issue Apr 5, 2023 · 0 comments · Fixed by #5607
Closed

Add same_channel for broadcast channel #5602

Darksonn opened this issue Apr 5, 2023 · 0 comments · Fixed by #5607
Labels
A-tokio Area: The main tokio crate C-feature-request Category: A feature request. E-easy Call for participation: Experience needed to fix: Easy / not much E-help-wanted Call for participation: Help is requested to fix this issue. M-sync Module: tokio/sync

Comments

@Darksonn
Copy link
Contributor

Darksonn commented Apr 5, 2023

Tokio's other channel types have a same_channel method that checks if two senders/receivers came from the same channel. It is missing for the broadcast channel and should be added.

It makes sense to add the method on both senders and receivers because for the broadcast channel, you can have more than one of both on the same channel.

The implementation should use Arc::ptr_eq.

@Darksonn Darksonn added E-help-wanted Call for participation: Help is requested to fix this issue. E-easy Call for participation: Experience needed to fix: Easy / not much A-tokio Area: The main tokio crate M-sync Module: tokio/sync C-feature-request Category: A feature request. labels Apr 5, 2023
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. E-easy Call for participation: Experience needed to fix: Easy / not much E-help-wanted Call for participation: Help is requested to fix this issue. M-sync Module: tokio/sync
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant