lock

package
v1.8.8 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 License: LGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetLockerAutoCleanup

func SetLockerAutoCleanup(threshold int64, minExistTime int64)

Types

type Locker

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

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

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