syncutils

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IntMap

type IntMap[K KType, V VType] struct {
	// contains filtered or unexported fields
}

func NewIntMap

func NewIntMap[K KType, V VType]() *IntMap[K, V]

func (*IntMap[K, V]) Delete

func (this *IntMap[K, V]) Delete(k K)

func (*IntMap[K, V]) DeleteUnsafe

func (this *IntMap[K, V]) DeleteUnsafe(k K)

func (*IntMap[K, V]) ForEachRead

func (this *IntMap[K, V]) ForEachRead(iterator func(k K, v V))

func (*IntMap[K, V]) ForEachWrite

func (this *IntMap[K, V]) ForEachWrite(iterator func(k K, v V))

func (*IntMap[K, V]) Get

func (this *IntMap[K, V]) Get(k K) (value V)

func (*IntMap[K, V]) GetOk

func (this *IntMap[K, V]) GetOk(k K) (value V, ok bool)

func (*IntMap[K, V]) Has

func (this *IntMap[K, V]) Has(k K) bool

func (*IntMap[K, V]) Len

func (this *IntMap[K, V]) Len() int

func (*IntMap[K, V]) Put

func (this *IntMap[K, V]) Put(k K, v V)

func (*IntMap[K, V]) PutCompact

func (this *IntMap[K, V]) PutCompact(k K, v V, compactFunc func(oldV V, newV V) V)

type KType

type KType interface {
	int | int16 | int32 | int64 | uint | uint16 | uint32 | uint64 | uintptr
}

type RWMutex

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

func NewRWMutex

func NewRWMutex(count int) *RWMutex

func (*RWMutex) Lock

func (this *RWMutex) Lock(index int)

func (*RWMutex) RLock

func (this *RWMutex) RLock(index int)

func (*RWMutex) RUnlock

func (this *RWMutex) RUnlock(index int)

func (*RWMutex) RWMutex

func (this *RWMutex) RWMutex(index int) *sync.RWMutex

func (*RWMutex) TryLock

func (this *RWMutex) TryLock(index int) bool

func (*RWMutex) TryRLock

func (this *RWMutex) TryRLock(index int) bool

func (*RWMutex) Unlock

func (this *RWMutex) Unlock(index int)

type VType

type VType interface {
	any
}

Jump to

Keyboard shortcuts

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