We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 52e4c7c commit 02b503eCopy full SHA for 02b503e
embassy-sync/CHANGELOG.md
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
8
## Unreleased
9
10
+- AtomicWaker now drops the Waker after waking it.
11
+
12
## 0.6.2 - 2025-01-15
13
14
- Add dynamic dispatch variant of `Pipe`.
embassy-sync/src/waitqueue/atomic_waker.rs
@@ -33,9 +33,8 @@ impl<M: RawMutex> GenericAtomicWaker<M> {
33
/// Wake the registered waker, if any.
34
pub fn wake(&self) {
35
self.waker.lock(|cell| {
36
- if let Some(w) = cell.replace(None) {
37
- w.wake_by_ref();
38
- cell.set(Some(w));
+ if let Some(w) = cell.take() {
+ w.wake();
39
}
40
})
41
0 commit comments