Documentation ¶
Overview ¶
Package threadsafe contains generic containers that are protected either by Mutexes or atomics underneath the hood.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Map ¶
type Map[K comparable, V any] struct { // contains filtered or unexported fields }
Map implements a simple thread-safe map protected by a mutex.
func NewThreadSafeMap ¶
func NewThreadSafeMap[K comparable, V any](m map[K]V) *Map[K, V]
NewThreadSafeMap returns a thread-safe map instance from a normal map.
Click to show internal directories.
Click to hide internal directories.