Releases: go-pkgz/pool
Releases · go-pkgz/pool
Version 0.9.0
Bug Fixes
- Fix batch channel closure when using WithChunkFn (#8, 566dcd6)
- Fix metrics timer recording on worker errors (#8, 566dcd6)
- Fix pool completion callback on context deadline exceeded (#8, 566dcd6)
- Fix WithWorkerChanSize to recreate shared channels (0c0c3b6)
Improvements
- Update dependencies and modernize code for Go 1.24 (#7, 0b5f6fd)
- Add CLAUDE.md documentation (ab83b51)
- Fix CI workflow for proper caching (#5, c06c81a)
Examples
v0.8.1
Hotfix Release
Bug Fixes
- Critical: Fix WithWorkerChanSize to properly recreate channels with configured size (#635c707)
- Remove duplicate comment in metrics.Stats.String (#94d84b6)
- Remove unnecessary context initialization in NewStateful (#21451f9)
Documentation
- Update minimum Go version requirement to 1.23+ (uses iter package) (#a8cef35)
Details
Previously, WithWorkerChanSize only updated the internal field but didn't recreate channels, making it effectively a no-op. This has been fixed to properly apply the configured channel buffer size.
Version 0.8.0
What's New in v0.8.0
New Features
- Rate Limiter Middleware - Added a new middleware that provides pool-wide rate limiting using a token bucket algorithm
- Configure rate (requests/second) and burst capacity
- Blocks when rate limit exceeded (respects context cancellation)
- Shared across all workers in the pool
- Example:
middleware.RateLimiter[Task](10, 5)for 10 tasks/sec with burst of 5
Updates
- Go 1.24 - Updated minimum Go version to 1.24
- Dependencies - Updated golang.org/x/sync to v0.14.0, added golang.org/x/time v0.11.0
- CI/CD - Updated GitHub Actions workflow and golangci-lint-action from v3 to v7
- Linter Config - Migrated
.golangci.ymlto v2 format for better maintainability
Bug Fixes
- Fixed logical error in batch overlap detection test
- Improved test timing tolerances to reduce CI flakiness
Documentation
- Updated README with rate limiting examples
- Enhanced middleware example to demonstrate rate limiting
- Normalized comment style throughout codebase
Improvements
- Code coverage increased by 0.2% to 94.482%
Usage Example
// Create pool with rate limiting
p := pool.New[string](5, worker).Use(
middleware.RateLimiter[string](10, 5), // 10 requests/sec with burst of 5
)Full Changelog
Version 0.6.0
What's Changed
Full Changelog: v0.5.0...v0.6.0
Version 0.5.0
Version 0.4.0
What's Changed
Full Changelog: v0.3.2...v0.4.0
Version 0.3.0
- improve options ergonomics, change to direct With methods
- remove context-related configuration options from WorkerGroup
- add alternative pool implementations to readme
Full Changelog: v0.2.1...v0.3.0
Version 0.2.0
- refactor metrics to separate stats and user-defined
- eliminate sync (mutex) on stats metrics as they are per worker
Full Changelog: v0.1.0...v0.2.0
Version 0.1.0
initial release