package
Version:
v0.0.1
Opens a new window with list of versions in this module.
Published: Nov 17, 2025
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Pool[T any] struct {
New func() T
}
Pool is a generic object pool for reusing objects of Poolable types.
Use sync.Pool from the standard library for concurrent use cases.
func (p *Pool[T]) Get() T
func (p *Pool[T]) Put(item T)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.