Skip to main content

Module concurrent

Module concurrent 

Source
Expand description

Stream-native concurrency primitives.

Signal<T> and Subscription<T> are latest-value state cells with an ArcSwap read mirror. State writes run on the caller thread; the actor owns the control plane for subscription registration, unregistration, close, terminal delivery, and slot-table snapshots. Signal exposes a coalesced change feed; Subscription exposes a bounded, lossless-by-default sequence-ring change feed.

Channel<T> is a closeable bounded MPSC source. Topic<T> is a stream-native broadcast hub: a control actor owns subscriber lifecycle while publishers enqueue directly into lock-free subscriber slots under a single global publish order.

Modules§

channel
Closeable bounded MPSC channel.

Structs§

Signal
Latest-value state cell with a lock-free synchronous snapshot and a coalesced change feed.
Subscription
Latest-value state cell with a bounded every-change feed.
Topic
A cloneable stream-native broadcast topic.

Enums§

SubscriptionOverflow
Overflow policy for a Subscription subscriber buffer.
TopicOverflow
Overflow policy for each Topic subscriber buffer.
TopicPublishError
Error returned by Topic::publish when the topic closes before the value can be accepted.
TopicTryPublishError
Error returned by Topic::try_publish.