This release adds full context-cancellation support across the WorkerPoolExecutor
, enabling timeouts and clean interrupt handling.
🚀 Highlights
-
Context-Aware Dispatch & Workers
Task dispatch, worker loops, and result collection are all now guarded withselect
onctx.Done()
, so cancellations and deadlines propagate immediately. -
Graceful Shutdown
Producer, workers, and collector all exit cleanly on context cancellation—no goroutine leaks or deadlocks. -
Error Propagation
Run
returnscontext.Canceled
orcontext.DeadlineExceeded
when aborted, allowing callers to handle timeouts or interrupts. -
Documentation Updates
- Expanded README with a Quick Start example using
signal.NotifyContext
for Ctrl+C support. - Clarified best practices for preserving task order and adding cancellation checks.
- Expanded README with a Quick Start example using
Thank you for using GoHPC—enjoy safer, more responsive parallel execution!
Full Changelog: v0.1.0...v0.2.0