diff options
Diffstat (limited to 'embassy-sync/src/watch.rs')
| -rw-r--r-- | embassy-sync/src/watch.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/embassy-sync/src/watch.rs b/embassy-sync/src/watch.rs index e76646c0b..08d6a833d 100644 --- a/embassy-sync/src/watch.rs +++ b/embassy-sync/src/watch.rs | |||
| @@ -10,7 +10,7 @@ use crate::blocking_mutex::raw::RawMutex; | |||
| 10 | use crate::blocking_mutex::Mutex; | 10 | use crate::blocking_mutex::Mutex; |
| 11 | use crate::waitqueue::MultiWakerRegistration; | 11 | use crate::waitqueue::MultiWakerRegistration; |
| 12 | 12 | ||
| 13 | /// The `Watch` is a single-slot signaling primitive that allows multiple receivers to concurrently await | 13 | /// The `Watch` is a single-slot signaling primitive that allows _multiple_ (`N`) receivers to concurrently await |
| 14 | /// changes to the value. Unlike a [`Signal`](crate::signal::Signal), `Watch` supports multiple receivers, | 14 | /// changes to the value. Unlike a [`Signal`](crate::signal::Signal), `Watch` supports multiple receivers, |
| 15 | /// and unlike a [`PubSubChannel`](crate::pubsub::PubSubChannel), `Watch` immediately overwrites the previous | 15 | /// and unlike a [`PubSubChannel`](crate::pubsub::PubSubChannel), `Watch` immediately overwrites the previous |
| 16 | /// value when a new one is sent, without waiting for all receivers to read the previous value. | 16 | /// value when a new one is sent, without waiting for all receivers to read the previous value. |
| @@ -298,7 +298,7 @@ impl<M: RawMutex, T: Clone, const N: usize> WatchBehavior<T> for Watch<M, T, N> | |||
| 298 | } | 298 | } |
| 299 | 299 | ||
| 300 | impl<M: RawMutex, T: Clone, const N: usize> Watch<M, T, N> { | 300 | impl<M: RawMutex, T: Clone, const N: usize> Watch<M, T, N> { |
| 301 | /// Create a new `Watch` channel. | 301 | /// Create a new `Watch` channel for `N` receivers. |
| 302 | pub const fn new() -> Self { | 302 | pub const fn new() -> Self { |
| 303 | Self { | 303 | Self { |
| 304 | mutex: Mutex::new(RefCell::new(WatchState { | 304 | mutex: Mutex::new(RefCell::new(WatchState { |
