mtx

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TimeoutSemaphore

type TimeoutSemaphore struct {
	// contains filtered or unexported fields
}

func NewTimeoutSemaphore

func NewTimeoutSemaphore(maxCount int64) *TimeoutSemaphore

func (*TimeoutSemaphore) AcquireWithAutoRelease

func (ts *TimeoutSemaphore) AcquireWithAutoRelease(ctx context.Context, weight int64, timeout time.Duration, id uint64,
	fnTimeoutCallback func(id uint64)) error

func (*TimeoutSemaphore) Release

func (ts *TimeoutSemaphore) Release(id uint64, weight int64)

Jump to

Keyboard shortcuts

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