3 unstable releases

Uses old Rust 2015

0.1.1 Jan 31, 2018
0.1.0 Dec 31, 2016
0.0.0 Dec 31, 2016

#1830 in Asynchronous

Download history 578/week @ 2023-12-23 439/week @ 2023-12-30 735/week @ 2024-01-06 895/week @ 2024-01-13 720/week @ 2024-01-20 716/week @ 2024-01-27 573/week @ 2024-02-03 980/week @ 2024-02-10 1472/week @ 2024-02-17 901/week @ 2024-02-24 1158/week @ 2024-03-02 974/week @ 2024-03-09 1049/week @ 2024-03-16 1278/week @ 2024-03-23 1570/week @ 2024-03-30 753/week @ 2024-04-06

4,693 downloads per month

MIT/Apache

10KB
233 lines

relay

Build Status

A light-weight Future channel for passing data among tasks.

Documentation

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


lib.rs:

relay

A light-weight channel using Future. A relay channel does not implement Send, and so is not meant for synchronizing between threads. Instead, its used to send message between tasks that live in the same thread.

It is similar to the oneshot channel in the futures crate, but since it is not meant for sending across threads, it performs about twice as fast.

Example

let (tx, rx) = relay::channel();
tx.complete("foo");
assert_eq!(rx.wait().unwrap(), "foo");

Dependencies

~53KB