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

#1903 in Asynchronous

Download history 1309/week @ 2024-03-25 1510/week @ 2024-04-01 841/week @ 2024-04-08 1183/week @ 2024-04-15 1159/week @ 2024-04-22 969/week @ 2024-04-29 855/week @ 2024-05-06 893/week @ 2024-05-13 1082/week @ 2024-05-20 1256/week @ 2024-05-27 1252/week @ 2024-06-03 734/week @ 2024-06-10 1032/week @ 2024-06-17 1094/week @ 2024-06-24 253/week @ 2024-07-01 620/week @ 2024-07-08

3,149 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