gpool

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

README

go-generic-pool

A simple generic pool implementation.

See documentation.

Licence

Licensed under Apache 2.0, see LICENCE.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenericPool

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

func NewGenericPool

func NewGenericPool[T any]() GenericPool[T]

func (*GenericPool[T]) Get

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

*T may be nil

func (*GenericPool[T]) Put

func (p *GenericPool[T]) Put(x *T)

func (*GenericPool[T]) SetNew

func (p *GenericPool[T]) SetNew(nyū func() *T)

Jump to

Keyboard shortcuts

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