[][src]Function lunatic::channel::bounded

pub fn bounded<T>(cap: usize) -> (Sender<T>, Receiver<T>) where
    T: Serialize + DeserializeOwned

Creates a bounded channel.

The created channel has space to hold at most cap messages at a time.

Panics

Capacity must be a positive number. If cap is zero, this function will panic.