diff options
| author | ibuki2003 <[email protected]> | 2025-01-26 17:23:41 +0900 |
|---|---|---|
| committer | ibuki2003 <[email protected]> | 2025-01-26 17:23:41 +0900 |
| commit | e2ddba92f7f3f9e64da10e8351e335989f388109 (patch) | |
| tree | c6d7e38197da8576b5718611bdeb8eb0c03d52fb /embassy-sync/src/pubsub | |
| parent | 51d87c6603631fda6fb59ca1a65a99c08138b081 (diff) | |
embassy-sync: fix clear() to wake senders
Diffstat (limited to 'embassy-sync/src/pubsub')
| -rw-r--r-- | embassy-sync/src/pubsub/mod.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/embassy-sync/src/pubsub/mod.rs b/embassy-sync/src/pubsub/mod.rs index a2360a1d8..606efff0a 100644 --- a/embassy-sync/src/pubsub/mod.rs +++ b/embassy-sync/src/pubsub/mod.rs | |||
| @@ -421,6 +421,9 @@ impl<T: Clone, const CAP: usize, const SUBS: usize, const PUBS: usize> PubSubSta | |||
| 421 | } | 421 | } |
| 422 | 422 | ||
| 423 | fn clear(&mut self) { | 423 | fn clear(&mut self) { |
| 424 | if self.is_full() { | ||
| 425 | self.publisher_wakers.wake(); | ||
| 426 | } | ||
| 424 | self.queue.clear(); | 427 | self.queue.clear(); |
| 425 | } | 428 | } |
| 426 | 429 | ||
