Module scheduling

Module scheduling 

Source
Expand description

Work-stealing schedulers for adaptive algorithms

This module provides work-stealing task schedulers optimized for adaptive numerical algorithms. These schedulers dynamically balance workload across threads, which is particularly important for algorithms with irregular computational patterns.

§Work-Stealing Concepts

Work-stealing is a scheduling technique where idle threads “steal” work from busy threads’ task queues. This is especially effective for:

  • Adaptive algorithms with unpredictable work distribution
  • Recursive divide-and-conquer algorithms
  • Dynamic load balancing scenarios

§Examples

use scirs2_integrate::scheduling::{WorkStealingPool, Task};

// Create work-stealing pool with 4 threads
let pool = WorkStealingPool::new(4);

// Submit a simple task
let task = Task::new(|| 0.5 * 0.5); // Simple computation
pool.submit(task);

Structs§

AdaptiveIntegrationTask
Adaptive integration task for work-stealing scheduler
PoolStatistics
Statistics about pool performance
Task
Simple boxed task for closures
WorkStealingPool
Work-stealing thread pool for adaptive algorithms

Traits§

WorkStealingTask
Generic task that can be executed by the work-stealing scheduler