timeout_lock

package
v0.83.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 2 Imported by: 0

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

type TimeoutLock struct {
	Timeout time.Duration
	// contains filtered or unexported fields
}

func NewTimeoutLock

func NewTimeoutLock(timeout time.Duration) *TimeoutLock

func (*TimeoutLock) Acquire

func (l *TimeoutLock) Acquire() bool

func (*TimeoutLock) Release

func (l *TimeoutLock) Release()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL