package
Version:
v0.0.0-...-888bb8d
Opens a new window with list of versions in this module.
Published: Oct 30, 2023
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Value[E any] struct {
}
func (v *Value[E]) Get() E
Get returns the current value of v. Calls to Get and Update are serialized.
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.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.