Trait fuel_vm::checked_transaction::ParallelExecutor
source · 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::Taskwhere
F: FnOnce() -> Result<(Word, usize), PredicateVerificationFailed> + Send + 'static,
fn create_task<F>(func: F) -> Self::Taskwhere F: FnOnce() -> Result<(Word, usize), PredicateVerificationFailed> + Send + 'static,
Creates a Future from a CPU-heavy task.