Demonstrates Dispatch with all three batching strategies, streaming, and fault isolation via per-worker process boundaries.
Generates 50 numeric datasets of varying sizes (small, medium, large) plus
5 "poison pill" datasets that contain invalid data (nil, NaN, empty).
Dispatches them to a Python batch_stats module using:
- FixedBatch -- fixed chunks of 10 items
- WeightedBatch -- batches capped at 500 total values
- KeyPartition -- one batch per dataset size category
- Streaming -- lazy stream with
as_completedordering
After all strategy runs, queries each worker for its accumulated running statistics (Welford's online mean/variance) to show that per-process state remains internally consistent -- something impossible under free-threaded Python where concurrent threads corrupt shared accumulators.
Summary
Functions
Run the full batch statistics demo, printing results to stdout.