pub struct ParallelMap<V, F, T, I>{
pub iter: TaskQueue<I, V>,
pub f: Pin<Box<F>>,
pub num_threads: usize,
pub v: PhantomData<V>,
pub t: PhantomData<T>,
}Fields§
§iter: TaskQueue<I, V>§f: Pin<Box<F>>§num_threads: usize§v: PhantomData<V>§t: PhantomData<T>Implementations§
Source§impl<I, V, F, T> ParallelMap<V, F, T, I>
ParallelMap is a object that allows map function to be run on AtomicIterators.
The results may be then collected in types implementing Collector trait.
impl<I, V, F, T> ParallelMap<V, F, T, I>
ParallelMap is a object that allows map function to be run on AtomicIterators. The results may be then collected in types implementing Collector trait.
use parallel_task::prelude::*;
let res = (0..100_000).collect::<Vec<i32>>().parallel_iter().map(|val|*val).collect::<Vec<i32>>();
assert_eq!(res.len(),100_000)Auto Trait Implementations§
impl<V, F, T, I> Freeze for ParallelMap<V, F, T, I>where
I: Freeze,
impl<V, F, T, I> RefUnwindSafe for ParallelMap<V, F, T, I>
impl<V, F, T, I> Send for ParallelMap<V, F, T, I>
impl<V, F, T, I> Sync for ParallelMap<V, F, T, I>
impl<V, F, T, I> Unpin for ParallelMap<V, F, T, I>
impl<V, F, T, I> UnwindSafe for ParallelMap<V, F, T, I>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more