aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrezak <[email protected]>2025-08-01 18:42:25 +0200
committerBrezak <[email protected]>2025-08-01 18:45:01 +0200
commit89d52827564b7997f0900614c7b0eb67664c121a (patch)
treeec44357c2c62f0b7f4d1976c6155131fabdd48cf
parente818e49d7a3c27a237bcd6d84df7971c3a02deba (diff)
embassy-sync: Update `MultiWakerRegistration::register` docs
In 3081ecf301a54f8ed3d0f72350dd21f8ac9e1b18 `register` was changed to clear the buffer when it's full, but the docs weren't updated.
-rw-r--r--embassy-sync/src/waitqueue/multi_waker.rs4
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.