pub struct WorkerPoolBuilder<'threads, T>{ /* private fields */ }
Expand description
Builder for WorkerPool
.
Implementations§
Source§impl<'threads, T> WorkerPoolBuilder<'threads, T>
impl<'threads, T> WorkerPoolBuilder<'threads, T>
Sourcepub fn main_tasks_tx<VALUE: Into<Sender<TaskItem<'threads, T>>>>(
self,
value: VALUE,
) -> Self
pub fn main_tasks_tx<VALUE: Into<Sender<TaskItem<'threads, T>>>>( self, value: VALUE, ) -> Self
For sending tasks into aggregator
Sourcepub fn threads<VALUE: Into<Vec<ScopedJoinHandle<'threads, ()>>>>(
self,
value: VALUE,
) -> Self
pub fn threads<VALUE: Into<Vec<ScopedJoinHandle<'threads, ()>>>>( self, value: VALUE, ) -> Self
Threads for aggregator + workers
Sourcepub fn results_rx<VALUE: Into<AsyncMutex<Receiver<TaskResult>>>>(
self,
value: VALUE,
) -> Self
pub fn results_rx<VALUE: Into<AsyncMutex<Receiver<TaskResult>>>>( self, value: VALUE, ) -> Self
For receiving TaskResult from all workers
Sourcepub fn build(self) -> Result<WorkerPool<'threads, T>, WorkerPoolBuilderError>
pub fn build(self) -> Result<WorkerPool<'threads, T>, WorkerPoolBuilderError>
Trait Implementations§
Auto Trait Implementations§
impl<'threads, T> !Freeze for WorkerPoolBuilder<'threads, T>
impl<'threads, T> !RefUnwindSafe for WorkerPoolBuilder<'threads, T>
impl<'threads, T> Send for WorkerPoolBuilder<'threads, T>
impl<'threads, T> Sync for WorkerPoolBuilder<'threads, T>
impl<'threads, T> Unpin for WorkerPoolBuilder<'threads, T>
impl<'threads, T> !UnwindSafe for WorkerPoolBuilder<'threads, T>
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