mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-21 00:00:10 +02:00
sync: Add watch, a single value broadcast channel (#922)
A single-producer, multi-consumer channel that only retains the _last_ sent value. Values are broadcasted out. This channel is useful for watching for changes to a value from multiple points in the code base (for example, changes to a configuration value).
This commit is contained in:
+3
-1
@@ -9,5 +9,7 @@
|
||||
//! from one task to another.
|
||||
//! - [mpsc](mpsc/index.html), a multi-producer, single-consumer channel for
|
||||
//! sending values between tasks.
|
||||
//! - [watch](watch/index.html), a single-producer, multi-consumer channel that
|
||||
//! only stores the **most recently** sent value.
|
||||
|
||||
pub use tokio_sync::{mpsc, oneshot};
|
||||
pub use tokio_sync::{mpsc, oneshot, watch};
|
||||
|
||||
Reference in New Issue
Block a user