diff --git a/embassy/src/util/mpsc.rs b/embassy/src/util/mpsc.rs index d41c8629..4c6e8a6f 100644 --- a/embassy/src/util/mpsc.rs +++ b/embassy/src/util/mpsc.rs @@ -218,6 +218,16 @@ where } } +// Safe to pass the receive future around since it locks channel whenever polled +unsafe impl<'ch, M, T, const N: usize> Send for RecvFuture<'ch, M, T, N> where + M: Mutex + Sync +{ +} +unsafe impl<'ch, M, T, const N: usize> Sync for RecvFuture<'ch, M, T, N> where + M: Mutex + Sync +{ +} + impl<'ch, M, T, const N: usize> Sender<'ch, M, T, N> where M: Mutex,