3 unstable releases

0.2.0 May 19, 2020
0.1.1 Oct 11, 2019
0.1.0 Oct 2, 2019

#36 in #sharing

MIT license

6KB
127 lines

Shared Iter

Clone an Iterator and shared it accros threads

use shared_iter::ShareIterator;

let iter1 = (1..20).share();
let iter2 = iter1.clone();

assert_eq!(iter1.take(10).collect::<Vec<_>>(), iter2.take(10).collect::<Vec<_>>());

lib.rs:

Shared Iter

Clone an Iterator and shared it accros threads

use shared_iter::ShareIterator;

let iter1 = (1..20).share();
let iter2 = iter1.clone();

assert_eq!(iter1.take(10).collect::<Vec<_>>(), iter2.take(10).collect::<Vec<_>>());

Dependencies

~45KB