Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Pool ¶
type Pool[T any] interface { // Get returns a value from the pool, or false. Get() (T, bool) // New returns a value from the pool, or creates a new one, panics if no new function. New() T // Put returns a value to the pool. Put(T) }
Pool is a generic pool interface, which wraps sync.Pool.
func NewPoolFunc ¶
NewPoolFunc returns a new pool with a new function.
Click to show internal directories.
Click to hide internal directories.