Skip to content

Commit fa473b8

Browse files
committed
rtic-sync: add comment about why we don't return_free_slot
1 parent 57e600f commit fa473b8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

rtic-sync/src/channel.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ impl<T, const N: usize> Channel<T, N> {
128128
core::ptr::read(ptr)
129129
};
130130

131+
// NOTE: do not `return_free_slot`, as we have mutable
132+
// access to this `Channel` and no `Receiver` or `Sender`
133+
// exist.
131134
assert!(!self.inner.freeq.as_mut().is_full());
132135
unsafe {
133136
// SAFETY: `freeq` is not ful.

0 commit comments

Comments
 (0)