Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyMutex ¶
type KeyMutex[T any] struct { // contains filtered or unexported fields }
KeyMutex provides a per-key mutex mechanism
type KeyRWMutex ¶
type KeyRWMutex[T any] struct { // contains filtered or unexported fields }
KeyRWMutex is a read-write lock with keys
func NewKeyRWMutex ¶
func NewKeyRWMutex[T any]() *KeyRWMutex[T]
NewKeyRWMutex creates a new KeyRWMutex
func (*KeyRWMutex[T]) GetLock ¶
func (kl *KeyRWMutex[T]) GetLock(key T) *sync.RWMutex
GetLock retrieves or creates the lock for the given key
Click to show internal directories.
Click to hide internal directories.