pub struct TaskExecutor<'exec> { /* private fields */ }
Expand description
The task executor. Implemented on top of a thread pool to maximize parallelism.
Implementations§
Source§impl<'exec> TaskExecutor<'exec>
impl<'exec> TaskExecutor<'exec>
Sourcepub fn new(
project: SharedProject,
executor: &'exec WorkerExecutor,
) -> TaskExecutor<'exec>
pub fn new( project: SharedProject, executor: &'exec WorkerExecutor, ) -> TaskExecutor<'exec>
Create a new task executor
Sourcepub fn queue_task<E>(&mut self, task: E) -> Result<(), Error>where
E: ExecutableTask + 'static,
pub fn queue_task<E>(&mut self, task: E) -> Result<(), Error>where
E: ExecutableTask + 'static,
Queue a task to be executed
Sourcepub fn finished_tasks(
&mut self,
) -> Vec<(TaskId, Result<(bool, bool), PayloadError<BuildException>>)>
pub fn finished_tasks( &mut self, ) -> Vec<(TaskId, Result<(bool, bool), PayloadError<BuildException>>)>
Gets finished tasks along with their build result. Does not repeat outputs, so the returned vector must be used
Auto Trait Implementations§
impl<'exec> Freeze for TaskExecutor<'exec>
impl<'exec> !RefUnwindSafe for TaskExecutor<'exec>
impl<'exec> Send for TaskExecutor<'exec>
impl<'exec> Sync for TaskExecutor<'exec>
impl<'exec> Unpin for TaskExecutor<'exec>
impl<'exec> !UnwindSafe for TaskExecutor<'exec>
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
Source§impl<T> InstanceOf for T
impl<T> InstanceOf for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more