pub struct TaskRunner { /* private fields */ }Expand description
Parallel task execution engine.
Implementations§
Source§impl TaskRunner
impl TaskRunner
Sourcepub fn new(concurrency: usize, working_dir: PathBuf) -> Self
pub fn new(concurrency: usize, working_dir: PathBuf) -> Self
Create a new task runner with the given concurrency limit.
Sourcepub fn with_run_mode(self, mode: RunMode) -> Self
pub fn with_run_mode(self, mode: RunMode) -> Self
Set the run mode (fail-fast or continue).
Sourcepub fn with_cache(self, cache: Cache) -> Self
pub fn with_cache(self, cache: Cache) -> Self
Enable caching with the given cache instance.
Sourcepub async fn run(
&self,
task_graph: TaskGraph,
project_graph: &ProjectGraph,
) -> Result<RunResult, RunnerError>
pub async fn run( &self, task_graph: TaskGraph, project_graph: &ProjectGraph, ) -> Result<RunResult, RunnerError>
Run all tasks in the task graph.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TaskRunner
impl RefUnwindSafe for TaskRunner
impl Send for TaskRunner
impl Sync for TaskRunner
impl Unpin for TaskRunner
impl UnsafeUnpin for TaskRunner
impl UnwindSafe for TaskRunner
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