atomiccounter

package
v1.247355.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 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 AtomicCounter

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

func NewAtomicCounter

func NewAtomicCounter() AtomicCounter

NewAtomicCounter returns a new counter with the default value of 0.

func (*AtomicCounter) Decrement

func (ac *AtomicCounter) Decrement()

func (*AtomicCounter) Get

func (ac *AtomicCounter) Get() int64

Get is not safe to use for synchronizing work between goroutines. It is just for logging the current value.

func (*AtomicCounter) Increment

func (ac *AtomicCounter) Increment()

Jump to

Keyboard shortcuts

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