[][src]Function drone_core::sync::spsc::ring::channel

pub fn channel<T, E>(capacity: usize) -> (Sender<T, E>, Receiver<T, E>)

Creates a new channel, returning the sender/receiver halves.

capacity is the capacity of the underlying ring buffer.

The Sender half is used to write values to the ring buffer. The Receiver half is a Stream that reads the values from the ring buffer.