mutex

package
v1.13.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyValue

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

KeyValue is a simple key/value store for arbitrary mutexes.

func New

func New() *KeyValue

New returns a properly initialized KeyValue mutex.

func (*KeyValue) Lock

func (m *KeyValue) Lock(key string)

Lock the mutex for the given key.

func (*KeyValue) Unlock

func (m *KeyValue) Unlock(key string)

Unlock the mutex for the given key.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳