aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy/src/util/mpsc.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/embassy/src/util/mpsc.rs b/embassy/src/util/mpsc.rs
index d41c86291..4c6e8a6f0 100644
--- a/embassy/src/util/mpsc.rs
+++ b/embassy/src/util/mpsc.rs
@@ -218,6 +218,16 @@ where
218 } 218 }
219} 219}
220 220
221// Safe to pass the receive future around since it locks channel whenever polled
222unsafe impl<'ch, M, T, const N: usize> Send for RecvFuture<'ch, M, T, N> where
223 M: Mutex<Data = ()> + Sync
224{
225}
226unsafe impl<'ch, M, T, const N: usize> Sync for RecvFuture<'ch, M, T, N> where
227 M: Mutex<Data = ()> + Sync
228{
229}
230
221impl<'ch, M, T, const N: usize> Sender<'ch, M, T, N> 231impl<'ch, M, T, const N: usize> Sender<'ch, M, T, N>
222where 232where
223 M: Mutex<Data = ()>, 233 M: Mutex<Data = ()>,