copied_multi_stream

Function copied_multi_stream 

Source
pub fn copied_multi_stream<S>(stream: S, i: usize) -> Vec<CopiedMultiStream<S>>
where S: Stream,
Expand description

Copies values from the inner stream into multiple new streams. Polls from inner stream one value and waits till all new streams have pulled a copied value. Note that not pulling from all new streams will result in a blocking state.

When the underlying stream terminates, all new streams which have allready pulled the last value will be Pending. When all new streams have pulled the last value, all streams will terminate on next pull.