pub struct WorkerPool { /* private fields */ }Expand description
Worker pool for parallel processing
Implementations§
Source§impl WorkerPool
impl WorkerPool
Sourcepub fn new(options: WorkerOptions) -> Self
pub fn new(options: WorkerOptions) -> Self
Create a new worker pool
Sourcepub fn process_jobs(
self,
jobs: Vec<BatchJob>,
progress: Arc<BatchProgress>,
cancelled: Arc<AtomicBool>,
stop_on_error: bool,
) -> Vec<JobResult>
pub fn process_jobs( self, jobs: Vec<BatchJob>, progress: Arc<BatchProgress>, cancelled: Arc<AtomicBool>, stop_on_error: bool, ) -> Vec<JobResult>
Process a batch of jobs
Auto Trait Implementations§
impl !RefUnwindSafe for WorkerPool
impl !UnwindSafe for WorkerPool
impl Freeze for WorkerPool
impl Send for WorkerPool
impl Sync for WorkerPool
impl Unpin for WorkerPool
impl UnsafeUnpin for WorkerPool
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