mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-16 21:05:35 +01:00
Fix #780
This commit is contained in:
parent
1123fd8731
commit
0a01fde4bd
1 changed files with 7 additions and 7 deletions
|
|
@ -432,16 +432,16 @@ impl<T, const N: usize> Receiver<'_, T, N> {
|
|||
critical_section::with(|cs| {
|
||||
assert!(!self.0.access(cs).freeq.is_full());
|
||||
unsafe { self.0.access(cs).freeq.push_back_unchecked(rs) }
|
||||
});
|
||||
|
||||
fence(Ordering::SeqCst);
|
||||
fence(Ordering::SeqCst);
|
||||
|
||||
// If someone is waiting in the WaiterQueue, wake the first one up.
|
||||
if let Some(wait_head) = self.0.wait_queue.pop() {
|
||||
wait_head.wake();
|
||||
}
|
||||
// If someone is waiting in the WaiterQueue, wake the first one up.
|
||||
if let Some(wait_head) = self.0.wait_queue.pop() {
|
||||
wait_head.wake();
|
||||
}
|
||||
|
||||
Ok(r)
|
||||
Ok(r)
|
||||
})
|
||||
} else if self.is_closed() {
|
||||
Err(ReceiveError::NoSender)
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue