Registry / async / bus
library2.4.1rscratesunverified

A lock-free, bounded, single-producer, multi-consumer, broadcast channel.

# Cargo.toml [dependencies] bus = "2.4.1"
INSTALL
IMPORT
SIG · BUS
B
bus
asyncrustv2.4.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Bus
use bus::Bus;

Creates a broadcast channel, sends a value, and receives it on a subscriber.

use bus::Bus; fn main() { let mut bus = Bus::new(10); let mut rx = bus.add_rx(); bus.broadcast(42); assert_eq!(rx.recv(), Some(42)); }
Debug
Known issues
gotchaSingle-producer only; multiple producers require external synchronization.
fix
Use a Mutex around the Bus if multiple threads need to broadcast.
affects: >=2.0.0
Upgrade
Version history
2.4.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
37 hits · last 30 days
node
34
Resources
bus — cargo add bus · libregistry