Qubit Rayon Batch
Rayon-backed batch executor implementation for the Qubit Rust libraries.
Overview
Qubit Rayon Batch provides the CPU-bound Rayon implementation for the
qubit-batch API. It keeps runtime-specific dependencies out of the core batch
crate while still sharing the same result, error, and progress-reporting types.
The crate provides:
RayonBatchExecutor: a Rayon-backed batch executor with a dedicated thread pool.RayonBatchExecutorBuilder: configuration for worker count, sequential fallback threshold, progress reporting, thread names, and stack size.RayonBatchExecutorBuildError: build-time validation and Rayon pool errors.- Convenient re-exports for
BatchExecutor,BatchCallResult,BatchOutcome,BatchExecutionState, andProgressReporter.
Features
- Run CPU-oriented batch work on a dedicated Rayon pool.
- Fall back to sequential execution for small batches.
- Keep stable task indexes for failures even when work finishes out of order.
- Capture task panics as batch failures while propagating progress-reporter panics.
- Reuse the
qubit-batchcore API without forcing Rayon on sequential users.
Installation
[]
= "0.7"
= "0.5.2"
Quick Start
use ;
let executor = builder
.thread_count
.sequential_threshold
.build
.expect;
let tasks = .map;
let result = executor.execute.expect;
assert_eq!;
assert_eq!;