locked

package
v0.0.0-...-888bb8d Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 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[E any] struct {
	// contains filtered or unexported fields
}

func (*Value[E]) Get

func (v *Value[E]) Get() E

Get returns the current value of v. Calls to Get and Update are serialized.

func (*Value[E]) Update

func (v *Value[E]) Update(f func(v E) E)

Update passes the current value of v to f and sets v to the value returned by f. Calls to Get and Update are serialized.

Jump to

Keyboard shortcuts

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