threadbeam
A simple, specialized channel type for beaming data out of a newly spawned thread.
Usage
First, add threadbeam to your crate's dependencies in Cargo.toml:
[]
= "0"
Examples
let = channel;
spawn;
let hello = rx.recv;
assert_eq!;
let = spawn;
assert_eq!;
assert_eq!;
parking_lot
To use parking_lot instead of the standard library's implementations of Condvar and Mutex, enable the parking_lot feature in your Cargo.toml:
[]
= { = "0", = ["parking_lot"] }
no_std via spin
For no_std environments, enable the no_std feature in your Cargo.toml:
This will use spin as the provider of the Mutex implementation.
[]
= { = "0", = ["no_std"] }