Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyedTimeoutLock ¶
type KeyedTimeoutLock[T comparable] struct { Timeout time.Duration // contains filtered or unexported fields }
func NewKeyedTimeoutLock ¶
func NewKeyedTimeoutLock[T comparable](timeout time.Duration) *KeyedTimeoutLock[T]
func (*KeyedTimeoutLock[T]) Acquire ¶
func (k *KeyedTimeoutLock[T]) Acquire(key T) bool
func (*KeyedTimeoutLock[T]) Release ¶
func (k *KeyedTimeoutLock[T]) Release(key T)
type TimeoutLock ¶
func NewTimeoutLock ¶
func NewTimeoutLock(timeout time.Duration) *TimeoutLock
func (*TimeoutLock) Acquire ¶
func (l *TimeoutLock) Acquire() bool
func (*TimeoutLock) Release ¶
func (l *TimeoutLock) Release()
Click to show internal directories.
Click to hide internal directories.