atomctr

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package atomctr implements basic atomic int64 counter

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ctr

type Ctr int64

Ctr implements basic atomic int64 counter

func (*Ctr) Add

func (a *Ctr) Add(inc int64) int64

increment counter

func (*Ctr) Dec

func (a *Ctr) Dec() int64

dec = --

func (*Ctr) Inc

func (a *Ctr) Inc() int64

inc = ++

func (*Ctr) Set

func (a *Ctr) Set(val int64)

set current value

func (*Ctr) Sub

func (a *Ctr) Sub(dec int64) int64

decrement counter

func (*Ctr) Swap

func (a *Ctr) Swap(val int64) int64

swap new value in and return old value

func (*Ctr) Value

func (a *Ctr) Value() int64

current value

Jump to

Keyboard shortcuts

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