atomicx

package
v0.0.0-...-eeaec48 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 1 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 {
	// contains filtered or unexported fields
}

func NewValue

func NewValue[T any]() *Value[T]

func NewValueOf

func NewValueOf[T any](t T) *Value[T]

func (*Value[T]) CompareAndSwap

func (v *Value[T]) CompareAndSwap(old, new T) (swapped bool)

func (*Value[T]) Load

func (v *Value[T]) Load() (val T)

func (*Value[T]) Store

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

func (*Value[T]) Swap

func (v *Value[T]) Swap(new T) (old T)

Jump to

Keyboard shortcuts

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