pub struct ParallelTranscodeExecutor { /* private fields */ }Expand description
Parallel batch proxy transcode executor powered by Rayon.
Jobs from a ProxyTranscodeQueue are dispatched to Rayon’s global or a
custom thread pool using work-stealing. Completed results are collected
in a thread-safe results vector.
Implementations§
Source§impl ParallelTranscodeExecutor
impl ParallelTranscodeExecutor
Sourcepub fn new(config: ParallelExecutorConfig) -> Self
pub fn new(config: ParallelExecutorConfig) -> Self
Create a new executor with the given configuration.
Sourcepub fn execute_batch(
&self,
queue: &ProxyTranscodeQueue,
) -> Vec<ParallelJobResult>
pub fn execute_batch( &self, queue: &ProxyTranscodeQueue, ) -> Vec<ParallelJobResult>
Execute all Queued jobs from queue in parallel and return results.
The queue is not mutated; callers should apply results using
ParallelTranscodeExecutor::apply_results if they wish to update
statuses.
§Errors
Never errors at the executor level; individual job failures are captured
in ParallelJobResult::success / ParallelJobResult::error.
Sourcepub fn apply_results(
queue: &mut ProxyTranscodeQueue,
results: &[ParallelJobResult],
)
pub fn apply_results( queue: &mut ProxyTranscodeQueue, results: &[ParallelJobResult], )
Apply a batch of results back to a mutable queue, updating job statuses.
Auto Trait Implementations§
impl Freeze for ParallelTranscodeExecutor
impl !RefUnwindSafe for ParallelTranscodeExecutor
impl Send for ParallelTranscodeExecutor
impl Sync for ParallelTranscodeExecutor
impl Unpin for ParallelTranscodeExecutor
impl UnsafeUnpin for ParallelTranscodeExecutor
impl !UnwindSafe for ParallelTranscodeExecutor
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> 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