atomic

package
v0.9.10 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Value

type Value[T any] struct {
	atomic.Value
}

func (*Value[T]) CompareAndSwap

func (a *Value[T]) CompareAndSwap(oldV, newV T) bool

func (*Value[T]) Load

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

func (*Value[T]) MarshalJSON

func (a *Value[T]) MarshalJSON() ([]byte, error)

func (*Value[T]) Store

func (a *Value[T]) Store(v T)

func (*Value[T]) Swap

func (a *Value[T]) Swap(v T) T

Jump to

Keyboard shortcuts

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