sync-oneshot
A minimal oneshot channel for synchronous Rust.
A oneshot channel is used for sending a single message between threads.
The channel function is used to create a Sender and Receiver
handle pair that form the channel.
The Sender handle is used by the producer to send the value.
The Receiver handle is used by the consumer to receive the value.
Each handle can be used on other threads.
Sender::send will no block the calling thread.
Receiver::recv will block the calling thread.
Example
use Duration;
let = channel;
spawn;
// blocking thread until a message available
let val = rx.recv.unwrap;
assert_eq!;
Licence
sync-oneshot is provided under the MIT license.See LICENSE