pub enum Executor {
Serial,
WorkerPool(ThreadPool),
}
Variants§
Serial
WorkerPool(ThreadPool)
Implementations§
Source§impl Executor
impl Executor
pub fn serial() -> Self
pub fn worker_pool(num_workers: usize) -> Self
pub fn num_workers(&self) -> usize
pub fn execute<F, R>(&self, f: F) -> R
pub fn execute_batch<F, R>(&self, f: Vec<F>) -> Vec<R>
pub fn submit<F>(&self, f: F)
pub fn submit_batch<F>(&self, f: Vec<F>)
Auto Trait Implementations§
impl Freeze for Executor
impl !RefUnwindSafe for Executor
impl Send for Executor
impl Sync for Executor
impl Unpin for Executor
impl !UnwindSafe for Executor
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