Function thingbuf::mpsc::blocking::with_recycle

source ·
pub fn with_recycle<T, R: Recycle<T>>(
    capacity: usize,
    recycle: R
) -> (Sender<T, R>, Receiver<T, R>)
Available on crate feature std only.
Expand description

Returns a new synchronous multi-producer, single consumer channel with the provided recycling policy.


Panics if the capacity exceeds usize::MAX & !(1 << (usize::BITS - 1)). This value represents the highest power of two that can be expressed by a usize, excluding the most significant bit.