orx-concurrent-iter 3.3.0

A thread-safe and ergonomic concurrent iterator trait and efficient lock-free implementations.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::con_iter::ConIterRange;
use crate::concurrent_iterable::ConcurrentIterable;
use core::ops::Range;

impl<T> ConcurrentIterable for Range<T>
where
    T: Send + From<usize> + Into<usize>,
    Range<T>: Default + Clone + ExactSizeIterator<Item = T>,
{
    type Item = T;

    type Iter = ConIterRange<T>;

    fn con_iter(&self) -> Self::Iter {
        Self::Iter::new(self.clone())
    }
}