lock

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: LGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetCleanUp added in v1.0.1

func SetCleanUp(threshold int64, minExistTime int64)

Types

type Locker

type Locker struct {
	// contains filtered or unexported fields
}
var GlobalLocker *Locker

GlobalLocker 全局锁变量掌控,不使用注入方式,只要调用包立刻初始化

func NewGlobalLocker added in v1.1.0

func NewGlobalLocker() *Locker

func (*Locker) Lock

func (l *Locker) Lock(name string) *sync.Mutex

func (*Locker) Unlock

func (l *Locker) Unlock(lock *sync.Mutex)

Jump to

Keyboard shortcuts

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