- Add empty acquire time to stats (Maxim Ivanov)
- Stop importing nanotime from runtime via linkname (maypok86)
- Fix: CreateResource cannot overflow pool. This changes documented behavior of CreateResource. Previously, CreateResource could create a resource even if the pool was full. This could cause the pool to overflow. While this was documented, it was documenting incorrect behavior. CreateResource now returns an error if the pool is full.
- Use Go 1.19 atomics and drop go.uber.org/atomic dependency
- Restore support to Go 1.18 via go.uber.org/atomic
- Fix create resource concurrently with Stat call race
- Concurrency control is now implemented with a semaphore. This simplifies some internal logic, resolves a few error conditions (including a deadlock), and improves performance. (Jan Dubsky)
- Go 1.19 is now required for the improved atomic support.
- Fix race condition when Close is called concurrently with multiple constructors
- Use generics instead of interface{} (Столяров Владимир Алексеевич)
- Add Reset
- Do not cancel resource construction when Acquire is canceled
- NewPool takes Config
- Acquire creates resources in background to allow creation to continue after Acquire is canceled (James Hartig)
- TryAcquire now does not block when background constructing resource
- Add TryAcquire (A. Jensen)
- Fix: remove memory leak / unintentionally pinned memory when shrinking slices (Alexander Staubo)
- Fix: Do not leave pool locked after panic from nil context
- Fix: Deadlock in CreateResource if pool was closed during resource acquisition (Dmitriy Matrenichev)
- Fix: Failed resource creation could cause concurrent Acquire to hang. (Evgeny Vanslov)
- Fix: Resource.Destroy no longer removes itself from the pool before its destructor has completed.
- Fix: Prevent crash when pool is closed while resource is being created.
- Pool.Close can be safely called multiple times
- AcquireAllIDle immediately returns nil if pool is closed
- CreateResource checks if pool is closed before taking any action
- Fix potential race condition when CreateResource and Close are called concurrently. CreateResource now checks if pool is closed before adding newly created resource to pool.
- Use runtime.nanotime for faster tracking of acquire time and last usage time.
- Track resource idle time to enable client health check logic. (Patrick Ellul)
- Add CreateResource to construct a new resource without acquiring it. (Patrick Ellul)
- Fix deadlock race when acquire is cancelled. (Michael Tharp)