xsync

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adder

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

A Adder is a striped int64 Adder.

Should be preferred over a single atomically updated uint64 Adder in high contention scenarios.

A Adder must not be copied after first use.

func NewAdder

func NewAdder() *Adder

NewAdder creates a new Adder instance.

func (*Adder) Add

func (a *Adder) Add(delta uint64)

Add adds the delta to the Adder.

func (*Adder) Value

func (a *Adder) Value() uint64

Value returns the current Adder value. The returned value may not include all of the latest operations in presence of concurrent modifications of the Adder.

Jump to

Keyboard shortcuts

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