Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadMap ¶
func LoadMap[K constraints.Ordered, V any](src *map[K]V) map[K]V
LoadMap atomically loads a map, given a pointer to it. It is a high-efficient method, because `map` is a actually just a pointer to a structure, so this is effectively just an atomic.LoadPointer call.
func LoadPointer ¶
func LoadPointer[T any](src **T) *T
LoadPointer atomically loads a pointer to a value. This is just a type-safe wrapper for atomic.LoadPointer.
Consider also using atomic.Pointer, instead of this function.
func StoreMap ¶
func StoreMap[K constraints.Ordered, V any](dst *map[K]V, src map[K]V)
StoreMap atomically stores a map, given a pointer to it. It is a high-efficient method, because `map` is a actually just a pointer to a structure, so this is effectively just an atomic.StorePointer call.
func StorePointer ¶
func StorePointer[T any](dst **T, src *T)
StorePointer atomically stores a pointer to a value. This is just a type-safe wrapper for atomic.LoadPointer.
Consider also using atomic.Pointer, instead of this function.
Types ¶
This section is empty.