syncx

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: GPL-3.0 Imports: 2 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 {
	// contains filtered or unexported fields
}

func NewPool

func NewPool[T any](new func() T, onAlloc func(val T), onFree func(val T)) *Pool[T]

NewPool

deprecated: syncx has been deprecated due to performance issues

func (*Pool[T]) Alloc

func (p *Pool[T]) Alloc() *PoolVarWrap[T]

func (*Pool[T]) Free

func (p *Pool[T]) Free(val T)

type PoolVarWrap

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

func (*PoolVarWrap[T]) Free

func (pv *PoolVarWrap[T]) Free()

func (*PoolVarWrap[T]) Val

func (pv *PoolVarWrap[T]) Val() T

Jump to

Keyboard shortcuts

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