syncutil

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LeakySemaphore

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

func NewLeakySemaphore

func NewLeakySemaphore(limit int) *LeakySemaphore

func (*LeakySemaphore) Acquire

func (c *LeakySemaphore) Acquire(ctx context.Context) (err error)

func (*LeakySemaphore) Release

func (c *LeakySemaphore) Release()

type NopSemaphore

type NopSemaphore struct{}

func (NopSemaphore) Acquire

func (NopSemaphore) Acquire(_ context.Context) error

func (NopSemaphore) Release

func (NopSemaphore) Release()

type Semaphore

type Semaphore interface {
	Acquire(ctx context.Context) (err error)
	Release()
}

Jump to

Keyboard shortcuts

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