sync

package
v0.0.0-...-364cddf Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithLocker0To0

func WithLocker0To0(l sync.Locker, f func())

func WithLocker0To1

func WithLocker0To1[F1 any](l sync.Locker, f func() F1) F1

func WithLocker0To2

func WithLocker0To2[F1, F2 any](l sync.Locker, f func() (F1, F2)) (F1, F2)

func WithLocker1To0

func WithLocker1To0[E1 any](l sync.Locker, f func(E1), e1 E1)

func WithLocker1To1

func WithLocker1To1[E1, F1 any](l sync.Locker, f func(E1) F1, e1 E1) F1

func WithLocker1To2

func WithLocker1To2[E1, F1, F2 any](l sync.Locker, f func(E1) (F1, F2), e1 E1) (F1, F2)

func WithLocker2To0

func WithLocker2To0[E1, E2 any](l sync.Locker, f func(E1, E2), e1 E1, e2 E2)

func WithLocker2To1

func WithLocker2To1[E1, E2, F1 any](l sync.Locker, f func(E1, E2) F1, e1 E1, e2 E2) F1

func WithLocker2To2

func WithLocker2To2[E1, E2, F1, F2 any](l sync.Locker, f func(E1, E2) (F1, F2), e1 E1, e2 E2) (F1, F2)

Types

type KLock

type KLock[K comparable] struct {
	// contains filtered or unexported fields
}

func (*KLock[K]) Lock

func (m *KLock[K]) Lock()

func (*KLock[K]) LockKey

func (m *KLock[K]) LockKey(k K)

func (*KLock[K]) RLock

func (m *KLock[K]) RLock()

func (*KLock[K]) RLockKey

func (m *KLock[K]) RLockKey(k K)

func (*KLock[K]) RUnlock

func (m *KLock[K]) RUnlock()

func (*KLock[K]) RUnlockKey

func (m *KLock[K]) RUnlockKey(k K)

func (*KLock[K]) Unlock

func (m *KLock[K]) Unlock()

func (*KLock[K]) UnlockKey

func (m *KLock[K]) UnlockKey(k K)

type Map

type Map[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func NewMap

func NewMap[K comparable, V any]() *Map[K, V]

func (*Map[K, V]) All

func (m *Map[K, V]) All() iter.Seq2[K, V]

func (*Map[K, V]) Clear

func (m *Map[K, V]) Clear()

func (*Map[K, V]) Delete

func (m *Map[K, V]) Delete(k K)

func (*Map[K, V]) GetOK

func (m *Map[K, V]) GetOK(k K) (V, bool)

func (*Map[K, V]) Keys

func (m *Map[K, V]) Keys() iter.Seq[K]

func (*Map[K, V]) Len

func (m *Map[K, V]) Len() int

func (*Map[K, V]) Replace

func (m *Map[K, V]) Replace(values map[K]V)

func (*Map[K, V]) Set

func (m *Map[K, V]) Set(k K, v V)

func (*Map[K, V]) Values

func (m *Map[K, V]) Values() iter.Seq[V]

Jump to

Keyboard shortcuts

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