concurrent

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Loader

type Loader[V any] func(id string) (V, error)

type Map

type Map[V any] struct {
	// contains filtered or unexported fields
}

func NewMap

func NewMap[V any](loader Loader[V], cleaner func(v V)) Map[V]

func (Map[V]) Get

func (m Map[V]) Get(id string) (V, error)

func (Map[V]) Put

func (m Map[V]) Put(id string, value V)

type Pool added in v0.0.7

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

func NewPool added in v0.0.7

func NewPool[T any](min uint32, createT func(release func(T)) T) *Pool[T]

func (*Pool[T]) Checkout added in v0.0.7

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

func (*Pool[T]) Depleted added in v0.0.7

func (p *Pool[T]) Depleted() uint64

how often the pool was empty and we had to create a buffer on the fly

func (*Pool[T]) Len added in v0.0.7

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

Jump to

Keyboard shortcuts

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