pools

package
v0.4.11 Latest Latest
Warning

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

Go to latest
Published: May 12, 2022 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const Imported = true

Variables

View Source
var (
	Bytes  = NewByteSlice(32, 64<<10)
	Buffer = buf.NewBytesPool(32, 64<<10)
)

Functions

func AcquireTimer

func AcquireTimer(timeout time.Duration) *time.Timer

func AcquireWaitGroup

func AcquireWaitGroup() *sync.WaitGroup

func NewByteSlice

func NewByteSlice(min, max int) *byteSlicePool

NewByteSlice creates new byteSlicePool that reuses objects which size is in logarithmic range [min, max].

Note that it is a shortcut for Custom() constructor with Options provided by WithLogSizeMapping() and WithLogSizeRange(min, max) calls.

func ReleaseTimer

func ReleaseTimer(t *time.Timer)

func ReleaseWaitGroup

func ReleaseWaitGroup(wg *sync.WaitGroup)

func ResetTimer

func ResetTimer(t *time.Timer, period time.Duration)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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