What problem does it solve?
Enables non-blocking, parallel execution of work and predictable thread-pool management so HTTP requests remain responsive and long-running or CPU-bound tasks execute safely outside the main request thread. It prevents accidental blocking of the request lifecycle, reduces latency for aggregate operations, and provides controls for timeouts, fallbacks, and executor lifecycle.
Core Features & Use Cases
- AsyncManager & Futures: Create, chain, complete, and combine ColdBox Futures for asynchronous pipelines and error-safe transformations.
- Parallel primitives: Run concurrent workloads with all, allApply, and anyOf to wait for every result, map collections in parallel, or pick the fastest response.
- Executors & scheduling: Register named executors (fixed, cached, single, scheduled), run tasks on custom pools, monitor and shut down executors, and schedule periodic jobs.
- Use Case: Process large order collections in parallel using allApply with a fixed thread pool to produce mementos, or dispatch fire-and-forget report generation without loading the full application context.
Quick Start
Use coldbox-async-programming to run an allApply over your orders collection with a fixed executor named myWorkers and return the aggregated mementos.