diff options
Diffstat (limited to 'embassy-sync')
| -rw-r--r-- | embassy-sync/src/waitqueue/multi_waker.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/embassy-sync/src/waitqueue/multi_waker.rs b/embassy-sync/src/waitqueue/multi_waker.rs index 0384d6bed..1c05f8eaf 100644 --- a/embassy-sync/src/waitqueue/multi_waker.rs +++ b/embassy-sync/src/waitqueue/multi_waker.rs | |||
| @@ -15,7 +15,9 @@ impl<const N: usize> MultiWakerRegistration<N> { | |||
| 15 | Self { wakers: Vec::new() } | 15 | Self { wakers: Vec::new() } |
| 16 | } | 16 | } |
| 17 | 17 | ||
| 18 | /// Register a waker. If the buffer is full the function returns it in the error | 18 | /// Register a waker. |
| 19 | /// | ||
| 20 | /// If the buffer is full, [wakes all the wakers](Self::wake), clears its buffer and registers the waker. | ||
| 19 | pub fn register(&mut self, w: &Waker) { | 21 | pub fn register(&mut self, w: &Waker) { |
| 20 | // If we already have some waker that wakes the same task as `w`, do nothing. | 22 | // If we already have some waker that wakes the same task as `w`, do nothing. |
| 21 | // This avoids cloning wakers, and avoids unnecessary mass-wakes. | 23 | // This avoids cloning wakers, and avoids unnecessary mass-wakes. |
