Skip to content

Restioson/barrage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

barrage

A simple async broadcast channel. It is runtime agnostic and can be used from any executor. It can also operate synchronously.

Example

#[tokio::main]
async fn main() {
    let (tx, rx) = barrage::unbounded();
    let rx2 = rx.clone();
    tx.send_async("Hello!").await.unwrap();
    assert_eq!(rx.recv_async().await, Ok("Hello!"));
    assert_eq!(rx2.recv_async().await, Ok("Hello!"));
}

About

A simple async broadcast channel

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages