Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ All notable changes to this project will be documented in this file.

* Add `event::AutoResetEvent`, a reusable signal that releases one waiter, retains at most one unassigned signal that can be cleared with `reset`, and transfers assigned signals when waits are cancelled.
* Add `ManualResetEvent::try_wait` to check readiness without registering a waiter or consuming the set state.
* Add `broadcast::spmc`, a lossless single-producer broadcast family with the same public surface and retention contract as `broadcast::mpmc` but a non-cloneable sender whose publish methods require exclusive access; receivers drain already-published slots without taking the publication lock, bounded retains at most the requested capacity and makes the producer wait for the slowest active subscription, and unbounded never waits and lets the retained backlog grow while releasing the storage the backlog has left behind.
* Implement `broadcast::mpmc::bounded`, a lossless bounded broadcast channel that retains at most the requested capacity and makes producers wait for the slowest active receiver.
* Add opt-in bounded and unbounded `asyncband::mpmc` queues with cloneable producers and competing consumers, delivering each accepted value to exactly one receiver while a receiver remains.
* Add an opt-in runtime-agnostic `Phaser` with shared observer handles, dynamic RAII participants registered individually or in batches through an owning iterator, `u64` phase numbers, split arrival/wait with cancellation-resilient retries, and a `close` operation that releases unfinished waits with `Closed`.
Expand Down
11 changes: 11 additions & 0 deletions asyncband/src/broadcast/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,16 @@
// under the License.

//! Broadcast channels grouped by producer topology.
//!
//! [`mpmc`] supports any number of concurrent producers. [`spmc`] is the single-producer
//! specialization: its sender is not [`Clone`] and publish methods require exclusive access
//! (`&mut self`). Receivers drain published slots without taking the publication lock, so a single
//! producer can fan out without serializing every subscription on that lock. Choose `spmc` when
//! the program has one publisher; choose `mpmc` when it does not.
//!
//! Both topologies are fan-out broadcast: every accepted value is delivered to every active
//! subscription. That is a different delivery family from a competing crate-root `spmc` queue,
//! which would give each value to exactly one receiver.

pub mod mpmc;
pub mod spmc;
Loading
Loading