Releases: go-playground/pool
Releases · go-playground/pool
Release 3.1.1
Release 1.2.2
What was Fixed
- Cancel could have closed channel twice, thanks for the pull request @zwh8800
Release 3.1.0
What's New?
- Added WaitAll() function to the batch, for when you need to wait for all work to be processed, but don't need to know the results.
eg. If the Work Unit's handle their own errors, logging etc... and it doesn't need to be reported back to the calling program.
Release 3.0.0
Fix gopkg.in pointing to v2.
Hi all, please update v3 by running go get -u gopkg.in/go-playground/pool.v3
, I must have selected the wrong branch while cutting the v3 release initially and it was pointing to v2, appologies for any inconvenience.
Release 3
What's New?
- library is not just a consumer pool, but now also handles a no worker/unlimited goroutine option; best of all they are completely interchangeable.
// Limited
pool.NewLimited(10)
//Unlimited
pool.New()
- Objects are not interfaces allowing for less breaking changes going forward.
- Simpler usage of Work Units, instead of
<-work.Done
now can dowork.Wait()
Release 2.1.0
What Changed?
- updated sync.RWMutex to be non pointer; no functional changes.
Release 2.0.1
What Changed
- fixed batch not unlocking mutex before return in rare case.
- fixed race condition found in the tests, not the pool logic, but the actual test logic.
- Added race detection testing in CI tests
Release 2
Whats New?
- Up to 300% faster due to lower contention ( BenchmarkSmallRun used to take 3 seconds, now 1 second )
- Cancels are much faster
- Easier to use, no longer need to know the # of Work Units to be processed.
- Pool can now be used as a long running/globally defined pool if desired ( v1 Pool was only good for one run )
- Supports single units of work as well as batching
- Pool can easily be reset after a Close() or Cancel() for reuse.
- Multiple Batches can be run and even cancelled on the same Pool.
- Supports individual Work Unit cancellation.
Examples
Release 1.2.1
What was Fixed
- corrected race condition when using hook param; some workers could have had nil.
Release 1.2
Added Consumer Hook
- now can register ConsumerHook function that will be run while firing up the consumer routines and that return value will be set/passed to each job. This is particularity useful when creating a saving pool so a the consumer hook would create a database connection for each job to reuse instead of creating an additional one for each job.
Example
https://github.com/go-playground/pool/blob/v1/pool_test.go#L55