xatomic

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package xatomic provides atomic utilities. It is an extension to the standard sync/atomic package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Value

type Value[T any] struct {
	// contains filtered or unexported fields
}

Value provides an atomic load and store of a value of type T.

func (*Value[T]) Load

func (x *Value[T]) Load() T

Load atomically loads and returns the value stored in x. If no value has been stored it returns the zero value of T.

func (*Value[T]) Store

func (x *Value[T]) Store(val T)

Store atomically stores val into x.

Jump to

Keyboard shortcuts

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