concurrent

package
v0.0.0-...-86833b7 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyLocker

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

KeyLocker is a synchronization mechanism that's allows the creation of lock by key,

func NewKeyLocker

func NewKeyLocker() *KeyLocker

NewKeyLocker returns a new KeyLocker

func (*KeyLocker) Lock

func (kmutex *KeyLocker) Lock(key string) sync.Locker

Lock locks a specific key, and returns an locked mutex you need to call Unlock to release the lock

Jump to

Keyboard shortcuts

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