Skip to main content

TaskScheduler

Trait TaskScheduler 

Source
pub trait TaskScheduler:
    Send
    + Sync
    + Debug {
    // Required methods
    fn submit(&self, batch: Arc<PartitionBatch>);
    fn max_workers(&self) -> usize;
}
Expand description

Abstract task scheduler for parallel partition execution.

Implementations manage a set of worker threads that dynamically claim partition tasks from a shared atomic counter for natural load balancing.

Required Methods§

Source

fn submit(&self, batch: Arc<PartitionBatch>)

Submit a batch of partition tasks for execution.

Source

fn max_workers(&self) -> usize

Number of worker threads in this scheduler.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§