Hyperbridge
Fast multi-producer, multi-consumer unbounded channel with async support. Inspired by crossbeam unbounded channel.
Examples
Hyperbridge::channel
: mpsc
use channel;
use thread;
let = new;
let mut counter = 0;
let threads = 10;
let values = 10000;
let mut handles = vec!;
for i in 0..threads
let mut iters = threads * values;
while iters > 0
let total = .map.sum;
for jh in handles.drain
Hyperbridge::channel
: mpmc
use channel;
use thread;
const VALUES: usize = 10000;
const THREADS: usize = 16;
let = new;
let counter = new;
let mut handles = vec!;
for i in 0..THREADS
for _ in 0..THREADS
for jh in handles.drain
let total = .map.sum;
Dependencies
# Cargo.toml
[]
= "0.1.0"
Feature with-futures
Turns on support for futures Sink, Stream:
# Cargo.toml
[]
= { = "0.1.0", = ["with-futures"] }
License
MIT/Apache-2.0