Add same_channel for broadcast channel #5602
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
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
.The text was updated successfully, but these errors were encountered: