diff options
| -rw-r--r-- | embassy/src/util/mpsc.rs | 10 |
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 | ||
| 222 | unsafe impl<'ch, M, T, const N: usize> Send for RecvFuture<'ch, M, T, N> where | ||
| 223 | M: Mutex<Data = ()> + Sync | ||
| 224 | { | ||
| 225 | } | ||
| 226 | unsafe impl<'ch, M, T, const N: usize> Sync for RecvFuture<'ch, M, T, N> where | ||
| 227 | M: Mutex<Data = ()> + Sync | ||
| 228 | { | ||
| 229 | } | ||
| 230 | |||
| 221 | impl<'ch, M, T, const N: usize> Sender<'ch, M, T, N> | 231 | impl<'ch, M, T, const N: usize> Sender<'ch, M, T, N> |
| 222 | where | 232 | where |
| 223 | M: Mutex<Data = ()>, | 233 | M: Mutex<Data = ()>, |
