mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-09-27 12:20:37 +00:00
Merge pull request #4490 from Brezak/waker-registration-docs
embassy-sync: Update `MultiWakerRegistration::register` docs
This commit is contained in:
commit
a8cb8a7fe1
@ -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