pub struct DecoderHandle { /* private fields */ }Expand description
Cloneable telemetry and control handle for a running crate::DecoderReader.
The handle remains usable after the reader has moved into another component such as a FASTQ parser. Cloning a handle does not create decoder workers.
Implementations§
Source§impl DecoderHandle
impl DecoderHandle
Sourcepub fn stats(&self) -> DecoderStats
pub fn stats(&self) -> DecoderStats
Returns an approximate lock-free snapshot of decoder activity.
Sourcepub fn set_worker_limit(&self, workers: usize) -> Result<(), WorkerLimitError>
pub fn set_worker_limit(&self, workers: usize) -> Result<(), WorkerLimitError>
Changes the maximum number of decoder workers that may accept work.
The method is nonblocking. Workers already executing a task finish it and publish any completed result they own before retiring. A worker whose bounded result handoff is blocked therefore remains live until output advances or the decode is cancelled. Raising the limit allows the coordinator to create replacement workers lazily when useful work is available.
§Errors
Returns WorkerLimitError when workers is zero or exceeds the
immutable worker budget supplied to crate::DecoderBuilder.
Trait Implementations§
Source§impl Clone for DecoderHandle
impl Clone for DecoderHandle
Source§fn clone(&self) -> DecoderHandle
fn clone(&self) -> DecoderHandle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more