crossbeam icon indicating copy to clipboard operation
crossbeam copied to clipboard

future cannot be sent between threads safely the trait `std::marker::Sync` is not implemented for `dyn crossbeam::crossbeam_channel::internal::SelectHandle`

Open Doslin opened this issue 2 years ago • 3 comments

Doslin avatar Nov 05 '22 06:11 Doslin

Please provide code to reproduce this.

taiki-e avatar Nov 20 '22 10:11 taiki-e

This happens when you try to await a future inside a crossbeam::select!{} macro. The error is not so clear as no information is usually given, but it's easy to detect it by simply commenting out the code with await inside select!.

TheQuantumPhysicist avatar Apr 05 '23 17:04 TheQuantumPhysicist

The situation of using crossbeam's select in async context seems odd to me: crossbeam's select blocks the current thread if all operations are not ready, which is basically bad behavior in async context.

taiki-e avatar Apr 29 '23 19:04 taiki-e