aboutsummaryrefslogtreecommitdiff
path: root/rtic-sync/src/channel.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rtic-sync/src/channel.rs')
-rw-r--r--rtic-sync/src/channel.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/rtic-sync/src/channel.rs b/rtic-sync/src/channel.rs
index 65a83d9..aca8cf4 100644
--- a/rtic-sync/src/channel.rs
+++ b/rtic-sync/src/channel.rs
@@ -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 {