lockKit

package
v2.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLocker

func NewLocker() *gmlock.Locker

NewLocker 内存锁模块,支持按照给定键名动态生成互斥锁,并发安全并支持Try*Lock特性.

使用场景: 需要动态创建互斥锁,或者需要维护大量动态锁的场景.

PS: (1) 当维护大量动态互斥锁的场景时,如果不再使用的互斥锁对象,请手动调用 Remove() 删除掉; (2) 可以锁 "关键词"; (3) 支持 "读写锁".

Types

This section is empty.

Jump to

Keyboard shortcuts

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