[−][src]Function flume::unbounded
pub fn unbounded<T>() -> (Sender<T>, Receiver<T>)
Create a channel with no maximum capacity.
Create an unbounded channel with a Sender
and Receiver
connected to each end
respectively. Values sent in one end of the channel will be received on the other end. The
channel is thread-safe, and both sender and receiver may be sent to threads as necessary. In
addition, Sender
may be cloned.
Examples
let (tx, rx) = flume::unbounded(); tx.send(42).unwrap(); assert_eq!(rx.recv().unwrap(), 42);