Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Value ¶
type Value[T comparable] struct { // contains filtered or unexported fields }
Value is type-param version of sync/atomic.Value. T is constrained to be complarable, because internal atomic.Value checks equality by comparison.
Zero Value is invalid. Value must be initialized with NewValue.
func NewValue ¶
func NewValue[T comparable]() Value[T]
NewValue returns newly created Value with inner value populated as zero of T.
func (*Value[T]) CompareAndSwap ¶
Click to show internal directories.
Click to hide internal directories.