# go-pool **Repository Path**: mirrors_percona/go-pool ## Basic Information - **Project Name**: go-pool - **Description**: A simple, persistent resource pool - **Primary Language**: Unknown - **License**: AGPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-25 - **Last Updated**: 2025-09-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README go-pool ======= This package contains a static and a dynamic pool which have: * Standard interface * Timeout for `Get()` * Callbacks for `Get()` and `Put()` * Persistence (items are _not_ garbage-collected) The static pool grows to its size after N many calls to `Get()`, where N equals the pool size. This is useful for cases where the number of items is also static, for example a worker pool where N many workers are always used. The dynamic pool grows to its size if the rate of calls to `Get()` exceeds the rate of calls to `Put()`. Else, the pool size can, for example, remain at one if there's a single caller (in which case the same item is reused repeatedly). Neither pool implements pruning or draining. These pools were inspired by http://openmymind.net/Introduction-To-Go-Channels/, the built-in sync.Pool, and https://github.com/go-sql-driver/mysql.