Function batch_queue

Source
pub fn batch_queue<T, const N: usize>(
    buckets: usize,
) -> (Sender<T, N>, Receiver<T, N>)
Expand description

Create a new batching queue

The bucket size is given as a const generic while the number of buckets are given as a function parameter. The transfer from sender to receiver happens only in units of one bucket (which may not be full, see close_batch).