Documentation ¶
Overview ¶
Package sync is utilities for synchronization
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TypedPool ¶
type TypedPool[K any] struct { // contains filtered or unexported fields }
TypedPool is a type-safe version of sync.Pool
func NewDefaultTypedPool ¶
NewDefaultTypedPool creates a TypedPool using the default `new` function to create instances of K
func NewSlicePool ¶
NewSlicePool creates a TypedPool using `make` to create slices of specified size and capacity for instances of []K
func NewTypedPool ¶
NewTypedPool creates a TypedPool using the provided function to create instances of K
Click to show internal directories.
Click to hide internal directories.