sync

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyedMutex

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

KeyedMutex is a mutex that locks on a key.

func (*KeyedMutex) Lock

func (m *KeyedMutex) Lock(key string) func()

Lock locks the mutex for the given key.

type KeyedMutexItem

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

KeyedMutexItem is an item in a KeyedMutex.

type Map added in v0.9.8

type Map = sync.Map

type Mutex added in v0.9.8

type Mutex = sync.Mutex

type Once

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

Once is an object that will perform exactly one action. Different from sync.Once, this implementation allows the once function to return an error, that doesn't update the done flag.

func (*Once) Do

func (o *Once) Do(f func() error) error

Do calls the function f if and only if Do is being called for the first time for this instance of Once

type Pool added in v0.9.8

type Pool = sync.Pool

type RWMutex added in v0.9.8

type RWMutex = sync.RWMutex

type WaitGroup added in v0.9.8

type WaitGroup = sync.WaitGroup

Jump to

Keyboard shortcuts

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