Technical Documentation: crossbeam-rs/crossbeam-channel
โน๏ธ Provenance: Multi-Tier Ingestion ยท CodeWiki Reference
Overview (`README.md`)
NOTE: This crate has been moved into the [crossbeam](https://github.com/crossbeam-rs/crossbeam) repository.
Do not use this repository.
Multi-producer multi-consumer channels for message passing
This library is an alternative to std::sync::mpsc with more features and better performance.
Usage
Add this to your Cargo.toml:
[dependencies]
crossbeam-channel = "0.3"Next, add this to your crate:
#[macro_use]
extern crate crossbeam_channel;The minimum required Rust version is 1.26.
License
Licensed under the terms of MIT license and the Apache License (Version 2.0).
See LICENSE-MIT and LICENSE-APACHE for details.
Overview (`benchmarks/README.md`)
Benchmarks
Tests
seq: A single thread sendsNmessages. Then it receivesNmessages.spsc: One thread sendsNmessages. Another thread receivesNmessages.mpsc:Tthreads sendN / Tmessages each. One thread receivesNmessages.mpmc:Tthreads sendN / Tmessages each.Tother threads receiveN / Tmessages each.select_rx:Tthreads sendN / Tmessages each into a separate channel. Another thread receivesNmessages by selecting over theTchannels.select_both:Tthreads sendN / Tmessages each by selecting overTchannels.Tother threads receiveN / Tmessages each by selecting over theTchannels.
Default configuration:
N = 5000000T = 4
Running
Runs benchmarks, stores results into *.txt files, and generates plot.png:
./run_all.shDependencies:
- Rust (nightly)
- Go
- Bash
- Python 2
- Matplotlib
Results
Machine: Intel(R) Core(TM) i7-5600U (2 physical cores, 4 logical cores)
Rust: rustc 1.30.0-nightly (90d36fb59 2018-09-13)
Go: go version go1.10.3 linux/amd64
Commit: 6cde88a (2018-09-17)
--- METRICS ---
- Files Extracted: 2
- Estimated Token Budget: ~545 tokens
- Canonical Reference: https://codewiki.google/github.com/crossbeam-rs/crossbeam-channel