pools

package
v0.16.25 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: BSD-3-Clause Imports: 4 Imported by: 3

Documentation

Index

Constants

View Source
const Imported = true

Variables

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

Functions

func AcquireStringsBuilder added in v0.6.27

func AcquireStringsBuilder() *strings.Builder

func AcquireTimer

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

func AcquireWaitGroup

func AcquireWaitGroup() *sync.WaitGroup

func NewByteSlice added in v0.1.4

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 ReleaseStringsBuilder added in v0.6.27

func ReleaseStringsBuilder(sb *strings.Builder)

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