Why does tokio::sync::broadcast::channel not have a Send requirement? #6459
Answered
by
sfackler
pretzelhammer
asked this question in
Q&A
-
The function signature of pub fn channel<T: Clone>(capacity: usize) -> (Sender<T>, Receiver<T>) But why is it let (tx, rx) = broadcast::channel::<Rc<RefCell<String>>(8); And then I spawn a bunch of tasks give each of them an |
Beta Was this translation helpful? Give feedback.
Answered by
sfackler
Apr 4, 2024
Replies: 1 comment 1 reply
-
Sender and Receiver are only Send if T is. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
pretzelhammer
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sender and Receiver are only Send if T is.