Skip to content

Commit 52a2ac5

Browse files
committed
rtic-sync: add comment about why we don't return_free_slot
1 parent 7fd2947 commit 52a2ac5

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
@@ -102,6 +102,9 @@ impl<T, const N: usize> Channel<T, N> {
102102
core::ptr::read(ptr)
103103
};
104104

105+
// NOTE: do not `return_free_slot`, as we have mutable
106+
// access to this `Channel` and no `Receiver` or `Sender`
107+
// exist.
105108
assert!(!self.inner.freeq.get_mut().is_full());
106109
unsafe {
107110
// SAFETY: `freeq` is not ful.

0 commit comments

Comments
 (0)