fifo

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: Apache-2.0 Imports: 0 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Map

type Map[T comparable] interface {
	Lock(key T)
	Unlock(key T)
}

Map is a map of mutexes whose locks are acquired in a FIFO order. The map is pruned automatically when all locks have been released for a key.

func NewMap

func NewMap[T comparable]() Map[T]

type Mutex

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

Mutex is a mutex lock whose lock and unlock operations are first-in-first-out (FIFO).

func New

func New() *Mutex

func (*Mutex) Lock

func (m *Mutex) Lock()

func (*Mutex) Unlock

func (m *Mutex) Unlock()

Jump to

Keyboard shortcuts

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