Skip to main content

extended

Function extended 

Source
pub fn extended<B: Copy + Send>(
    out: &mut Vec<B>,
    n: usize,
    unit: usize,
    write: &(dyn Fn(Range<usize>, &mut Slots<'_, B>) -> bool + Sync),
) -> bool
Expand description

Appends n items to out, and gives whether every call of write said true. write(range, slots) fills slots with the items in range, in order. The calls split across threads as split splits a call, in units of unit items. A call that leaves any of its slots unfilled panics, and out keeps its length.