| Crates.io | chunnel |
| lib.rs | chunnel |
| version | 0.1.0 |
| created_at | 2025-01-21 13:03:22.777773+00 |
| updated_at | 2025-01-21 13:03:22.777773+00 |
| description | Async mpmc(multi producer multi consumer) channel |
| homepage | |
| repository | https://github.com/mox692/chunnel |
| max_upload_size | |
| id | 1524880 |
| size | 73,180 |
Async mpmc(multi producer multi consumer) channel.
This crate provides an async version of the mpmc channel, similar to std::sync::mpmc or crossbeam_channel.
Example code:
use chunnel::mpmc::bounded::bounded;
#[tokio::main]
async fn main() {
let (sender, receiver) = bounded::<i32, 16>();
tokio::spawn(async move {
for i in 0..10 {
sender.send(i).await.unwrap();
}
});
let _ = receiver.recv().await.unwrap();
}
[dependencies]
chunnel = "0.1"