This library provides lock free in memory message queue broker.
[dependencies]
mqb = "0.2"
use mqb::MessageQueueBroker;
#[tokio::main]
async fn main() {
let mqb = MessageQueueBroker::unbounded();
let sub = mqb.subscribe(1);
assert!(mqb.send(&1, 1).await.is_ok());
assert_eq!(sub.recv().await.unwrap(), 1);
}
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.