4 releases

Uses old Rust 2015

0.1.3 Jul 21, 2018
0.1.2 Jan 6, 2018
0.1.1 Jan 6, 2018
0.1.0 May 7, 2017

#573 in Concurrency

Download history 104/week @ 2023-12-05 114/week @ 2023-12-12 161/week @ 2023-12-19 83/week @ 2023-12-26 84/week @ 2024-01-02 157/week @ 2024-01-09 217/week @ 2024-01-16 205/week @ 2024-01-23 161/week @ 2024-01-30 267/week @ 2024-02-06 256/week @ 2024-02-13 420/week @ 2024-02-20 264/week @ 2024-02-27 178/week @ 2024-03-05 183/week @ 2024-03-12 183/week @ 2024-03-19

854 downloads per month
Used in 32 crates (via fibers)

MIT license

22KB
499 lines

nbchan

Documentation Build Status Code Coverage License: MIT

Highly optimized non-blocking communication channels implemented in Rust.

Documentation

Informal Benchmarks

The version of nbchan is v0.1.0:

$ cat /etc/lsb-release | tail -1
DISTRIB_DESCRIPTION="Ubuntu 17.04"

$ cat /proc/cpuinfo | grep 'model name'
model name      : Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz
model name      : Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz
model name      : Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz
model name      : Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz

$ rustup run nightly rustc -V
rustc 1.18.0-nightly (036983201 2017-04-26)

$ rustup run nightly cargo bench
running 8 tests
test create_nbchan_oneshot                ... bench:          23 ns/iter (+/- 1)
test create_std_mpsc                      ... bench:          64 ns/iter (+/- 6)
test failure_send_nbchan_oneshot          ... bench:          40 ns/iter (+/- 1)
test failure_send_std_mpsc                ... bench:          85 ns/iter (+/- 6)
test multithread_send_recv_nbchan_oneshot ... bench:          71 ns/iter (+/- 19)
test multithread_send_recv_std_mpsc       ... bench:         108 ns/iter (+/- 53)
test send_recv_nbchan_oneshot             ... bench:          35 ns/iter (+/- 4)
test send_recv_std_mpsc                   ... bench:          82 ns/iter (+/- 3)

test result: ok. 0 passed; 0 failed; 0 ignored; 8 measured
$ cargo run --example channel_size
nbchan::oneshot::Sender<()>:   8 bytes
nbchan::oneshot::Receiver<()>: 8 bytes
std::sync::mpsc::Sender<()>:   16 bytes
std::sync::mpsc::Receiver<()>: 16 bytes

No runtime deps