diff options
| author | datdenkikniet <jcdra1@gmail.com> | 2025-03-17 20:49:54 +0100 |
|---|---|---|
| committer | Emil Fresk <emil.fresk@gmail.com> | 2025-06-18 19:19:37 +0000 |
| commit | 7178f0854151759d2b3c147a418d454411c223ed (patch) | |
| tree | 192aa6f68fa2fe6344b316a866488b44421d00d9 /rtic-sync/src | |
| parent | 2671a4de267fdd979ac36880662dc349642b8538 (diff) | |
rtic-sync: add comment about why we don't `return_free_slot`
Diffstat (limited to 'rtic-sync/src')
| -rw-r--r-- | rtic-sync/src/channel.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rtic-sync/src/channel.rs b/rtic-sync/src/channel.rs index 3706e58..3bd7b92 100644 --- a/rtic-sync/src/channel.rs +++ b/rtic-sync/src/channel.rs @@ -128,6 +128,9 @@ impl<T, const N: usize> Channel<T, N> { core::ptr::read(ptr) }; + // NOTE: do not `return_free_slot`, as we have mutable + // access to this `Channel` and no `Receiver` or `Sender` + // exist. assert!(!self.inner.freeq.as_mut().is_full()); unsafe { // SAFETY: `freeq` is not ful. |
