Versions in this module Expand all Collapse all v0 v0.1.11 Oct 3, 2023 v0.1.10 Oct 2, 2023 Changes in this version + type Counter struct + func NewCounter() (newCounter *Counter) + func (c *Counter) Decrease() (newValue int) + func (c *Counter) Get() (value int) + func (c *Counter) Increase() (newValue int) + func (c *Counter) Set(newValue int) (oldValue int) + func (c *Counter) Subscribe(subscribers ...func(oldValue, newValue int)) (unsubscribe func()) + func (c *Counter) Update(delta int) (newValue int) + func (c *Counter) WaitIsAbove(threshold int) + func (c *Counter) WaitIsBelow(threshold int) + func (c *Counter) WaitIsZero() + type DAGMutex struct + func NewDAGMutex() *DAGMutex[T] + func (d *DAGMutex[T]) Lock(id T) + func (d *DAGMutex[T]) RLock(ids ...T) + func (d *DAGMutex[T]) RUnlock(ids ...T) + func (d *DAGMutex[T]) Unlock(id T) + type KRWMutex struct + func NewKRWMutex() *KRWMutex + func (k *KRWMutex) Free(key interface{}) + func (k *KRWMutex) Register(key interface{}) (result *RWMutex) + type LockableEntity interface + Locks func() (locks []interface{}) + type MultiMutex struct + func NewMultiMutex() *MultiMutex + func (m *MultiMutex) Lock(ids ...interface{}) + func (m *MultiMutex) LockEntity(entity LockableEntity) + func (m *MultiMutex) Unlock(ids ...interface{}) + func (m *MultiMutex) UnlockEntity(entity LockableEntity) + type MultiMutexLockBuilder struct + func (lockBuilder *MultiMutexLockBuilder) AddLock(identifier interface{}) *MultiMutexLockBuilder + func (lockBuilder *MultiMutexLockBuilder) Build() []interface{} + type Mutex = sync.Mutex + type RWMultiMutex struct + func (mutex *RWMultiMutex) Lock(identifiers ...interface{}) + func (mutex *RWMultiMutex) RLock(identifiers ...interface{}) + func (mutex *RWMultiMutex) RUnlock(identifiers ...interface{}) + func (mutex *RWMultiMutex) Unlock(identifiers ...interface{}) + type RWMutex = sync.RWMutex + type Stack struct + func NewStack() (newStack *Stack[T]) + func (b *Stack[T]) Pop() (element T, success bool) + func (b *Stack[T]) PopOrWait(waitCondition func() bool) (element T, success bool) + func (b *Stack[T]) Push(task T) + func (b *Stack[T]) SignalShutdown() + func (b *Stack[T]) Size() int + func (b *Stack[T]) WaitIsEmpty() + func (b *Stack[T]) WaitSizeIsAbove(threshold int) + func (b *Stack[T]) WaitSizeIsBelow(threshold int) + type StarvingMutex struct + func NewStarvingMutex() *StarvingMutex + func (f *StarvingMutex) Lock() + func (f *StarvingMutex) RLock() + func (f *StarvingMutex) RUnlock() + func (f *StarvingMutex) String() (humanReadable string) + func (f *StarvingMutex) Unlock()