diff options
| author | Ulf Lilleengen <[email protected]> | 2025-08-04 09:17:50 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-04 09:17:50 +0000 |
| commit | a8cb8a7fe1f594b765dee4cfc6ff3065842c7c6e (patch) | |
| tree | 8bba4c7e7236eac87c9374d0f7c14ff18531340a /embassy-sync/src/waitqueue/multi_waker.rs | |
| parent | aba545aea07f4c54e587f03000bd1a2439c89f70 (diff) | |
| parent | 89d52827564b7997f0900614c7b0eb67664c121a (diff) | |
Merge pull request #4490 from Brezak/waker-registration-docs
embassy-sync: Update `MultiWakerRegistration::register` docs
Diffstat (limited to 'embassy-sync/src/waitqueue/multi_waker.rs')
| -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. |
