package
Version:
v0.4.0
Opens a new window with list of versions in this module.
Published: Aug 23, 2023
License: Apache-2.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package pools provides a generic pool implementation.
type Pool[T any] struct {
}
Pool is a generic pool implementation.
func NewPool[T any](new func() T) *Pool[T]
NewPool creates a new pool.
func (p *Pool[T]) Get() T
Get gets an item from the pool.
func (p *Pool[T]) Put(v T)
Put puts an item back to the pool.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.