lock

package
v0.0.0-...-3077202 Latest Latest
Warning

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

Go to latest
Published: May 23, 2025 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 Mutex

type Mutex interface {
	Lock()
	Unlock()
	TryLock() bool
}

type MutexPool

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

func NewMutexPool

func NewMutexPool(n ...int) *MutexPool

NewMutexPool returns a mutex pool.

func (*MutexPool) Get

func (m *MutexPool) Get(s string) Mutex

type RWMutex

type RWMutex interface {
	Mutex
	RLock()
	RUnlock()
	TryRLock() bool
}

type RwMutexPool

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

func NewRWMutexPool

func NewRWMutexPool(n ...int) *RwMutexPool

NewRWMutexPool returns a rw mutex pool.

func (*RwMutexPool) Get

func (m *RwMutexPool) Get(s string) RWMutex

Jump to

Keyboard shortcuts

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