pool

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

type Pool[T any] struct {
	New func() T
	// contains filtered or unexported fields
}

Pool is a generic object pool for reusing objects of Poolable types.

Use sync.Pool from the standard library for concurrent use cases.

func (*Pool[T]) Get

func (p *Pool[T]) Get() T

func (*Pool[T]) Len

func (p *Pool[T]) Len() int

func (*Pool[T]) Put

func (p *Pool[T]) Put(item T)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL