Execution
PipelineTask
Task management for pipeline execution and control
Overview
PipelineTask
manages the execution lifecycle of a pipeline, handling frame queuing, processing, and pipeline state management. It provides mechanisms for graceful shutdown, cancellation, and metrics collection.
Class Definition
Constructor Parameters
pipeline
BasePipeline
requiredThe pipeline to be executed
params
PipelineParams
default: "PipelineParams()"Configuration parameters for the pipeline task
clock
BaseClock
default: "SystemClock()"Clock for timing and synchronization
Pipeline Parameters
Task Components
Source
Sink
Methods
Task Control
Frame Management
Usage Examples
Basic Task Execution
With Frame Queuing
Graceful Shutdown
Task Flow
Queue Processing
Push Queue
Up Queue
Metrics Support
Control Flow
-
Task Creation
- Initialize queues
- Setup source/sink
- Link pipeline
-
Task Execution
- Start processing tasks
- Handle frame queuing
- Process control frames
-
Task Termination
- Handle cleanup
- Stop processing
- Clean resources
Notes
- Manages pipeline lifecycle
- Handles graceful shutdown
- Supports metrics collection
- Processes frames in order
- Manages task state
- Provides clean cancellation
- Supports async iteration
- Thread-safe execution