diff options
| author | Matthew Tran <[email protected]> | 2025-08-28 10:35:27 -0500 |
|---|---|---|
| committer | Matthew Tran <[email protected]> | 2025-08-28 10:42:48 -0500 |
| commit | fcf659fbe5c0cd6acf328281089c35c999f5514a (patch) | |
| tree | 1b611ea6b3349748f4732c72143952fdcd2f7559 /embassy-sync | |
| parent | 1f945bcebd3b0018b3b5541ede767583df3545d8 (diff) | |
embassy-sync: Don't drop wakers in Signal::reset
Diffstat (limited to 'embassy-sync')
| -rw-r--r-- | embassy-sync/CHANGELOG.md | 1 | ||||
| -rw-r--r-- | embassy-sync/src/signal.rs | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/embassy-sync/CHANGELOG.md b/embassy-sync/CHANGELOG.md index 593396586..a53d5f5b1 100644 --- a/embassy-sync/CHANGELOG.md +++ b/embassy-sync/CHANGELOG.md | |||
| @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
| 7 | 7 | ||
| 8 | <!-- next-header --> | 8 | <!-- next-header --> |
| 9 | ## Unreleased - ReleaseDate | 9 | ## Unreleased - ReleaseDate |
| 10 | - Fix wakers getting dropped by `Signal::reset` | ||
| 10 | 11 | ||
| 11 | ## 0.7.2 - 2025-08-26 | 12 | ## 0.7.2 - 2025-08-26 |
| 12 | 13 | ||
diff --git a/embassy-sync/src/signal.rs b/embassy-sync/src/signal.rs index d96e36245..229b1fa99 100644 --- a/embassy-sync/src/signal.rs +++ b/embassy-sync/src/signal.rs | |||
| @@ -83,7 +83,7 @@ where | |||
| 83 | 83 | ||
| 84 | /// Remove the queued value in this `Signal`, if any. | 84 | /// Remove the queued value in this `Signal`, if any. |
| 85 | pub fn reset(&self) { | 85 | pub fn reset(&self) { |
| 86 | self.state.lock(|cell| cell.set(State::None)); | 86 | self.try_take(); |
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | fn poll_wait(&self, cx: &mut Context<'_>) -> Poll<T> { | 89 | fn poll_wait(&self, cx: &mut Context<'_>) -> Poll<T> { |
