lock

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2025 License: MIT Imports: 1 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 interface {
	Lock()
	Unlock()
	Clone(name string) Locker
}

Locker 锁接口,应用于并发获取公众账号AccessToken等场景

type Mutex

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

Mutex 通过 sync.Mutex 实现的锁

func (*Mutex) Clone

func (mu *Mutex) Clone(name string) Locker

func (*Mutex) Lock

func (mu *Mutex) Lock()

func (*Mutex) Unlock

func (mu *Mutex) Unlock()

Jump to

Keyboard shortcuts

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