bzlock

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lock

func Lock(key string)

func LockFunc

func LockFunc(key string, fn func())

func RLock

func RLock(key string)

func RLockFunc

func RLockFunc(key string, fn func())

func UnLock

func UnLock(key string)

func UnRLock

func UnRLock(key string)

func UnWLock

func UnWLock(key string)

func WLock

func WLock(key string)

func WLockFunc

func WLockFunc(key string, fn func())

Types

type BzLocker

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

func New

func New(key string) *BzLocker

func (*BzLocker) Lock

func (l *BzLocker) Lock()

func (*BzLocker) LockFunc

func (l *BzLocker) LockFunc(fn func())

func (*BzLocker) UnLock

func (l *BzLocker) UnLock()

type BzRWLocker

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

func NewRW

func NewRW(key string) *BzRWLocker

func (*BzRWLocker) Lock

func (l *BzRWLocker) Lock()

func (*BzRWLocker) LockFunc

func (l *BzRWLocker) LockFunc(fn func())

func (*BzRWLocker) RLock

func (l *BzRWLocker) RLock()

func (*BzRWLocker) RLockFunc

func (l *BzRWLocker) RLockFunc(fn func())

func (*BzRWLocker) UnLock

func (l *BzRWLocker) UnLock()

func (*BzRWLocker) UnRLock

func (l *BzRWLocker) UnRLock()

func (*BzRWLocker) WLockFunc

func (l *BzRWLocker) WLockFunc(fn func())

type Mutex

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

func NewMutex

func NewMutex() *Mutex

func (*Mutex) Lock

func (m *Mutex) Lock()

func (*Mutex) UnLock

func (m *Mutex) UnLock()

Jump to

Keyboard shortcuts

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