Function futures::unsync::mpsc::channel[][src]

pub fn channel<T>(buffer: usize) -> (Sender<T>, Receiver<T>)
Expand description

Creates a bounded in-memory channel with buffered storage.

This method creates concrete implementations of the Stream and Sink traits which can be used to communicate a stream of values between tasks with backpressure. The channel capacity is exactly buffer. On average, sending a message through this channel performs no dynamic allocation.