pub struct ParallelForEach<V, F, I>{
pub iter: TaskQueue<I, V>,
pub f: Pin<Box<F>>,
pub num_threads: usize,
pub v: PhantomData<V>,
}Expand description
ParallelForEach is a structure type that captures the information necessary to run the values within the Iterator in parallel Its the result of parallel_task that can be run on any Iterator implementing type.
use parallel_task::prelude::*;
(0..100_000).collect::<Vec<i32>>().parallel_iter().for_each(|val|{ print!(" {}",val);});
assert_eq!(1,1)Fields§
§iter: TaskQueue<I, V>§f: Pin<Box<F>>§num_threads: usize§v: PhantomData<V>Implementations§
Auto Trait Implementations§
impl<V, F, I> Freeze for ParallelForEach<V, F, I>where
I: Freeze,
impl<V, F, I> RefUnwindSafe for ParallelForEach<V, F, I>
impl<V, F, I> Send for ParallelForEach<V, F, I>where
F: Send,
impl<V, F, I> Sync for ParallelForEach<V, F, I>
impl<V, F, I> Unpin for ParallelForEach<V, F, I>
impl<V, F, I> UnwindSafe for ParallelForEach<V, F, 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