pub trait ParallelExecutor {
type Task: Future + Send + 'static;
// Required methods
fn create_task<F>(func: F) -> Self::Task
where F: FnOnce() -> (usize, Result<Word, PredicateVerificationFailed>) + Send + 'static;
fn execute_tasks<'async_trait>(
futures: Vec<Self::Task>,
) -> Pin<Box<dyn Future<Output = Vec<(usize, Result<Word, PredicateVerificationFailed>)>> + Send + 'async_trait>>
where Self: 'async_trait;
}Expand description
Executes CPU-heavy tasks in parallel.
Required Associated Types§
Required Methods§
Sourcefn create_task<F>(func: F) -> Self::Task
fn create_task<F>(func: F) -> Self::Task
Creates a Future from a CPU-heavy task.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".