Skip to content

Commit e9e81fb

Browse files
committed
Blah
1 parent fca8df6 commit e9e81fb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rtic-sync/src/channel.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,8 @@ impl<T, const N: usize> Sender<'_, T, N> {
363363
}
364364

365365
// SAFETY: `free_slot_ptr` is valid for writes, as `free_slot_ptr` is still alive.
366-
let slot = unsafe { free_slot_ptr.replace(None, cs) };
366+
let slot = unsafe { free_slot_ptr.replace(None, cs) }
367+
.or_else(|| self.0.access(cs).freeq.pop_back());
367368

368369
if let Some(slot) = slot {
369370
Poll::Ready(Ok(slot))

0 commit comments

Comments
 (0)