mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-09-26 20:00:27 +00:00
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.
This commit is contained in:
parent
e818e49d7a
commit
89d5282756
@ -15,7 +15,9 @@ impl<const N: usize> MultiWakerRegistration<N> {
|
||||
Self { wakers: Vec::new() }
|
||||
}
|
||||
|
||||
/// Register a waker. If the buffer is full the function returns it in the error
|
||||
/// Register a waker.
|
||||
///
|
||||
/// If the buffer is full, [wakes all the wakers](Self::wake), clears its buffer and registers the waker.
|
||||
pub fn register(&mut self, w: &Waker) {
|
||||
// If we already have some waker that wakes the same task as `w`, do nothing.
|
||||
// This avoids cloning wakers, and avoids unnecessary mass-wakes.
|
||||
|
Loading…
x
Reference in New Issue
Block a user