Skip to content

Releases: go-pkgz/pool

Version 0.9.0

28 Dec 21:05

Choose a tag to compare

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

  • Add basic example - minimal hello world (#8, 7799cbe)
  • Add chunking example - WithChunkFn for key-based routing (#8, 7799cbe)
  • Add pool_completion example - pool completion callback (#8, 7799cbe)
  • Add READMEs for all new examples (#8, 7799cbe)
  • Fix linter issues across all examples (#8, 7799cbe)

v0.8.1

08 Aug 06:13
21451f9

Choose a tag to compare

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

28 May 08:54
eca4c49

Choose a tag to compare

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.yml to 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

v0.7.0...v0.8.0

Version 0.6.0

17 Feb 20:25

Choose a tag to compare

What's Changed

  • Cross-pools communication by @umputun in #3
  • Add examples for corss-pools use cases

Full Changelog: v0.5.0...v0.6.0

Version 0.5.0

14 Feb 21:23
6a04124

Choose a tag to compare

What's Changed

Full Changelog: v0.4.0...v0.5.0

Version 0.4.0

13 Feb 05:00
3cecbde

Choose a tag to compare

What's Changed

  • Add middleware support to pool package by @umputun in #1

Full Changelog: v0.3.2...v0.4.0

Version 0.3.0

09 Feb 06:09

Choose a tag to compare

  • 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

08 Feb 18:34

Choose a tag to compare

  • 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

07 Feb 23:00

Choose a tag to compare

initial release