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:
Brezak 2025-08-01 18:42:25 +02:00
parent e818e49d7a
commit 89d5282756
No known key found for this signature in database
GPG Key ID: CB3891E2B1279D7C

View File

@ -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.