pub trait ParallelExecutor {
type Task: Future + Send + 'static;
// Required methods
fn create_task<F>(func: F) -> Self::Task
where F: FnOnce() -> Result<(Word, usize), PredicateVerificationFailed> + Send + 'static;
fn execute_tasks<'async_trait>(
futures: Vec<Self::Task>,
) -> Pin<Box<dyn Future<Output = Vec<Result<(Word, usize), 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.
Object Safety§
This trait is not object safe.