locker

package
v0.0.0-...-c3f54fb Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Locker

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

func NewLocker

func NewLocker(count int) *Locker

func (*Locker) Locks

func (l *Locker) Locks(keys ...string)

顺序加锁(互斥)

func (*Locker) RLocks

func (l *Locker) RLocks(keys ...string)

顺序加锁(只读)

func (*Locker) RUnlocks

func (l *Locker) RUnlocks(keys ...string)

顺序解锁(只读)

func (*Locker) RWLocks

func (l *Locker) RWLocks(wkeys []string, rkeys []string)

顺序加锁 wkeys和rkeys可以有重叠

func (*Locker) RWUnlocks

func (l *Locker) RWUnlocks(wkeys []string, rkeys []string)

顺序解锁 wkeys和rkeys可以有重叠

func (*Locker) Unlocks

func (l *Locker) Unlocks(keys ...string)

顺序解锁(互斥)

Jump to

Keyboard shortcuts

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