atomic

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Counter

type Counter struct {
	// contains filtered or unexported fields
}

func NewCounter

func NewCounter(min, max int64, wrap bool) *Counter

func (*Counter) Decr

func (c *Counter) Decr() int64

func (*Counter) Get

func (c *Counter) Get() int64

func (*Counter) Incr

func (c *Counter) Incr() int64

Incr increments the counter by 1. If the counter is at the Max value, it wraps around to Min.

Jump to

Keyboard shortcuts

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