Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Versioned ¶
type Versioned[T any] struct { Val T // contains filtered or unexported fields }
Versioned[T] is a linearizable register storing a value of type T. Each update to the value changes its unique (but not necessarily ordered) version. Spurious version changes are possible, i.e., the version may change even if the value hasn't.
Like a sync.Mutex, Versioned should not be copied.
Click to show internal directories.
Click to hide internal directories.