https://github.com/kprotty/uchan
Channels
https://github.com/kprotty/uchan
Last synced: about 1 year ago
JSON representation
Channels
- Host: GitHub
- URL: https://github.com/kprotty/uchan
- Owner: kprotty
- License: mit
- Created: 2022-06-12T01:52:34.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-11-05T16:05:59.000Z (over 3 years ago)
- Last Synced: 2025-04-05T08:35:04.304Z (about 1 year ago)
- Language: Rust
- Size: 41 KB
- Stars: 23
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# μchan
Small, scalable, unbounded, mpsc channel.
[](
https://crates.io/crates/uchan)
[](
https://docs.rs/uchan)
[](
https://github.com/kprotty/uchan)
This is (almost) a drop-in replacement for `std::sync::mpsc` with a focus on being lock-free and scalable for both producers and consumers.
It also supports being used as `#![no_std]`, in which the caller provides a trait used to block and unblock a thread, with the queue implementing everything else from there.
## Usage
```toml
[dependencies]
uchan = "0.1.4"
```
## Benchmarking
```bash
cd benchmark
cargo run --release
```
For adding custom channels to the benchmark, see `benchmark/src/queues.rs`.
## License
uchan is licensed under MIT (http://opensource.org/licenses/MIT)