Function channel
fn channel<T>() -> (Sender<T>, Receiver<T>)
Creates a new oneshot channel, returning the sender/receiver halves.
Examples
use oneshot;
use thread;
let = channel;
// Spawn off an expensive computation.
spawn;
#
do_other_work;
// Let's see what that answer was...
println!;
// `receiver` is consumed by `recv`, so we cannot use it anymore.