Repository navigation
v0.5.0 — Features: subscriber count, UMONITOR/UMWAIT, PodBus
New features
Subscriber count per topic (#18)
Query how many subscribers are reading a topic — enables lifecycle management for processors.
let count = pub_.subscriber_count(&topic)?;
if count == 0 { /* skip publishing, tear down processor */ }FFI: crossbar_topic_subscriber_count(pub_, topic)
UMONITOR/UMWAIT for Intel Alder Lake+ (#3)
New WaitStrategy::MonitorWait variant that uses Intel WAITPKG instructions for cache-line-aware low-power waiting (~30ns wakeup vs ~1ms sleep).
let guard = stream.recv_with(WaitStrategy::MonitorWait)?;Falls back to PAUSE on unsupported CPUs. CPUID detection cached.
PodBus<T: Pod> SPMC broadcast ring (#2)
Single-producer, multi-consumer broadcast ring where publish cost is O(1) regardless of subscriber count.
let bus = PodBus::<u64>::new(256);
let mut sub = bus.subscriber();
bus.publish(42);
assert_eq!(sub.try_recv(&bus), Some(42));Prefetch next ring slot on publish (#4)
Hides RFO stall in multi-core scenarios by prefetching the next slot's cache line before the current write.
Stats
- 46 tests + 5 doc-tests, all passing
- +849 lines across 16 files
Full changelog: https://github.com/userFRM/crossbar/blob/main/CHANGELOG.md