atomic

package
v1.0.90 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2020 License: GPL-3.0 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
}

Counter is an atomic counter

func (*Counter) Add

func (counter *Counter) Add(value int64) int64

Add adds value to counter

func (*Counter) Decrement

func (counter *Counter) Decrement() int64

Decrement decrements counter

func (*Counter) Get

func (counter *Counter) Get() int64

Get gets counter

func (*Counter) GetUint64

func (counter *Counter) GetUint64() uint64

GetUint64 gets counter as uint64

func (*Counter) Increment

func (counter *Counter) Increment() int64

Increment increments counter

func (*Counter) Reset

func (counter *Counter) Reset() int64

Reset resets counter and returns the previous value

func (*Counter) Set

func (counter *Counter) Set(value int64)

Set sets counter

func (*Counter) Subtract

func (counter *Counter) Subtract(value int64) int64

Subtract subtracts value from counter

type Flag

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

Flag is an atomic flag

func (*Flag) IsSet

func (flag *Flag) IsSet() bool

IsSet checks whether flag is set

func (*Flag) Set

func (flag *Flag) Set() bool

Set sets flag and returns its previous value

func (*Flag) Unset

func (flag *Flag) Unset()

Unset sets flag

type Uint32

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

Uint32 is a wrapper for atomic operations on uint32

func (*Uint32) Get

func (variable *Uint32) Get() uint32

Get gets the value

func (*Uint32) Set

func (variable *Uint32) Set(value uint32)

Set sets the value

Jump to

Keyboard shortcuts

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