Documentation ¶
Overview ¶
Package pool manages a user defined set of resources.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPoolClosed = errors.New("Pool has been closed")
ErrPoolClosed is returned when an Acquire returns on a closed pool.
Functions ¶
This section is empty.
Types ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool manages a set of resources that can be shared safely by multiple goroutines. The resource being managed must implement the io.Closer interface.
func New ¶
New creates a pool that manages resources. A pool requires a function that can allocate a new resource and the size of the pool.
Click to show internal directories.
Click to hide internal directories.