Function rustc_rayon::iter::plumbing::bridge[][src]

pub fn bridge<I, C>(par_iter: I, consumer: C) -> C::Result where
    I: IndexedParallelIterator,
    C: Consumer<I::Item>, 
Expand description

This helper function is used to “connect” a parallel iterator to a consumer. It will convert the par_iter into a producer P and then pull items from P and feed them to consumer, splitting and creating parallel threads as needed.

This is useful when you are implementing your own parallel iterators: it is often used as the definition of the drive_unindexed or drive methods.