package
Version:
v0.7.1
Opens a new window with list of versions in this module.
Published: Nov 12, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package pool provides a pool for reusing objects.
AllRefsCount returns the reference count of all pools.
Synced is a pool that is safe for concurrent use.
Register registers a new pool with the given name.
Get returns an object from the pool.
If the pool is empty, nil is returned.
Put puts an object back to the pool.
RefsCount returns the reference count of the pool.
type Trackable interface {
RefsCount() int
}
Trackable is the interface that wraps the RefsCount method.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.