Releases: qcserestipy/gohpc
v0.2.0 – Context-Aware Worker Pool & Graceful Shutdown
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 withselectonctx.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
Runreturnscontext.Canceledorcontext.DeadlineExceededwhen aborted, allowing callers to handle timeouts or interrupts. -
Documentation Updates
- Expanded README with a Quick Start example using
signal.NotifyContextfor 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
v0.1.0 – First Light
Release v0.1.0 “First Light” 🚀
Release Date: 2025-05-14
🎉 Highlights
-
Generic WorkerPoolExecutor
- Introduced a type-safe, generic
WorkerPoolExecutor[T, R]inpkg/workerpool/pool.go. - Supports any input/output types via Go 1.18+ generics.
- Arbitrary functions can be dispatched to
NumWorkersgoroutines and results are returned in input order.
- Introduced a type-safe, generic
-
Command-Line π Approximation Example
-
cmd/example/main.go(aliased asbin/piin CI) now accepts a-nflag for total Monte Carlo trials. -
Prints detailed run metadata:
- Number of trials
- CPU core count
- Work distribution
- Per-worker RNG seeding debug logs
- Final π approximation, error w.r.t.
math.Pi, elapsed time, and throughput.
-
-
Per-Worker Independent RNG
- Each task/worker is seeded once at startup to avoid contention on the global RNG.
-
Structured Logging
- Integrated [Logrus](https://github.com/sirupsen/logrus) for structured, timestamped INFO/DEBUG output.
-
GitHub CI Workflow
-
go.ymlCI pipeline:- Builds
cmd/example/main.goasbin/pi - Runs a smoke test:
./bin/pi -n 10000000000on each push tomain
- Builds
-
Ensures performance regression checks on full-scale Monte Carlo runs.
-
🛠️ Installation
go get github.com/qcserestipy/gohpc📦 Usage
# Build the CLI:
go build -o bin/pi cmd/example/main.go
# Run with your desired sample count:
./bin/pi -n 10000000000🔭 Roadmap
-
v0.2.0
- Add SIMD-accelerated random number generators
- Implement parallel BLAS/LAPACK wrappers
-
v1.0.0
- Introduce distributed task scheduling over multi-node clusters
- Support GPU offloading for heavy‐compute kernels
❤️ Contributing
Contributions, issues, and feature requests are welcome!
Please open an issue or pull request on [GitHub](https://github.com/qcserestipy/gohpc).
Thank you for using GoHPC!
Full Changelog: https://github.com/qcserestipy/gohpc/commits/v0.1.0