atomicutil

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package atomicutil contains functions for working with the 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 is a generic atomic.Value.

func NewValue

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

NewValue creates a new Value.

func (*Value[T]) Load

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

Load loads the value atomically.

func (*Value[T]) Store

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

Store stores the value atomically.

Jump to

Keyboard shortcuts

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