package
Version:
v0.29.0
Opens a new window with list of versions in this module.
Published: Mar 31, 2026
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
¶
type Pool[T any] struct {
}
Pool provides a typed wrapper around sync.Pool.
func New[T any](newFn func() T) *Pool[T]
New returns a typed pool backed by sync.Pool.
func (p *Pool[T]) Get() T
Get returns a pooled value.
func (p *Pool[T]) Put(v T)
Put returns a value to the pool.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.