pool

package
v0.0.0-...-7a23388 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup(rank int)

Types

type BytesAlloctor

type BytesAlloctor struct {
	// contains filtered or unexported fields
}
var GAlloctor *BytesAlloctor

func (*BytesAlloctor) Get

func (ba *BytesAlloctor) Get(size int) []byte

func (*BytesAlloctor) Put

func (ba *BytesAlloctor) Put(buf []byte)

type ObjectPool

type ObjectPool[T any] struct {
	// contains filtered or unexported fields
}

func NewObjectPool

func NewObjectPool[T any](newFn func() *T) *ObjectPool[T]

func (*ObjectPool[T]) Get

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

func (*ObjectPool[T]) Put

func (p *ObjectPool[T]) Put(v *T)

Jump to

Keyboard shortcuts

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