From 89d52827564b7997f0900614c7b0eb67664c121a Mon Sep 17 00:00:00 2001 From: Brezak Date: Fri, 1 Aug 2025 18:42:25 +0200 Subject: [PATCH] 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. --- embassy-sync/src/waitqueue/multi_waker.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 MultiWakerRegistration { 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.