Make RecvFuture sync
RecvFuture always locks the underlying Channel when polled.
This commit is contained in:
parent
332bc44b8c
commit
4d8d8e386f
@ -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<Data = ()> + Sync
|
||||
{
|
||||
}
|
||||
unsafe impl<'ch, M, T, const N: usize> Sync for RecvFuture<'ch, M, T, N> where
|
||||
M: Mutex<Data = ()> + Sync
|
||||
{
|
||||
}
|
||||
|
||||
impl<'ch, M, T, const N: usize> Sender<'ch, M, T, N>
|
||||
where
|
||||
M: Mutex<Data = ()>,
|
||||
|
Loading…
Reference in New Issue
Block a user