pool

package
v0.0.0-...-5cecdfb Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0, MIT Imports: 1 Imported by: 2

Documentation

Overview

Package pool provides a trivial integer pool.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

type Pool struct {

	// Start is the starting value (if needed).
	Start uint64

	// Limit is the upper limit.
	Limit uint64
	// contains filtered or unexported fields
}

Pool is a simple allocator.

func (*Pool) Get

func (p *Pool) Get() (uint64, bool)

Get gets a value from the pool.

func (*Pool) Put

func (p *Pool) Put(v uint64)

Put returns a value to the pool.

Jump to

Keyboard shortcuts

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