Documentation ¶
Index ¶
- type AtomicBitSet
- func (self *AtomicBitSet) CompareAndSet(index int, current, next bool) bool
- func (self *AtomicBitSet) CompareAndSetAll(current, next uint32) bool
- func (self *AtomicBitSet) IsSet(index int) bool
- func (self *AtomicBitSet) Load() uint32
- func (self *AtomicBitSet) Set(index int, val bool)
- func (self *AtomicBitSet) Store(val uint32)
- type AtomicValue
- type CopyOnWriteMap
- type CopyOnWriteSlice
- type RefCount
- type Semaphore
- type WaitGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AtomicBitSet ¶
type AtomicBitSet uint32
func (*AtomicBitSet) CompareAndSet ¶
func (self *AtomicBitSet) CompareAndSet(index int, current, next bool) bool
func (*AtomicBitSet) CompareAndSetAll ¶
func (self *AtomicBitSet) CompareAndSetAll(current, next uint32) bool
func (*AtomicBitSet) IsSet ¶
func (self *AtomicBitSet) IsSet(index int) bool
func (*AtomicBitSet) Load ¶
func (self *AtomicBitSet) Load() uint32
func (*AtomicBitSet) Set ¶
func (self *AtomicBitSet) Set(index int, val bool)
func (*AtomicBitSet) Store ¶
func (self *AtomicBitSet) Store(val uint32)
type AtomicValue ¶
func (*AtomicValue[T]) Load ¶
func (self *AtomicValue[T]) Load() T
func (*AtomicValue[T]) Store ¶
func (self *AtomicValue[T]) Store(val T)
type CopyOnWriteMap ¶
type CopyOnWriteMap[K comparable, V any] struct { // contains filtered or unexported fields }
func (*CopyOnWriteMap[K, V]) AsMap ¶
func (self *CopyOnWriteMap[K, V]) AsMap() map[K]V
func (*CopyOnWriteMap[K, V]) Clear ¶
func (self *CopyOnWriteMap[K, V]) Clear()
func (*CopyOnWriteMap[K, V]) Delete ¶ added in v2.0.10
func (self *CopyOnWriteMap[K, V]) Delete(key K)
func (*CopyOnWriteMap[K, V]) Get ¶
func (self *CopyOnWriteMap[K, V]) Get(key K) V
func (*CopyOnWriteMap[K, V]) Put ¶
func (self *CopyOnWriteMap[K, V]) Put(key K, value V)
type CopyOnWriteSlice ¶
type CopyOnWriteSlice[T any] struct { // contains filtered or unexported fields }
func (*CopyOnWriteSlice[T]) Append ¶
func (self *CopyOnWriteSlice[T]) Append(toAdd T)
func (*CopyOnWriteSlice[T]) Delete ¶
func (self *CopyOnWriteSlice[T]) Delete(toRemove T)
func (*CopyOnWriteSlice[T]) DeleteIf ¶ added in v2.0.10
func (self *CopyOnWriteSlice[T]) DeleteIf(filter func(T) bool)
func (*CopyOnWriteSlice[T]) Value ¶
func (self *CopyOnWriteSlice[T]) Value() []T
type Semaphore ¶
type Semaphore interface { Acquire() AcquireWithTimeout(t time.Duration) bool TryAcquire() bool Release() bool }
func NewSemaphore ¶
type WaitGroup ¶
type WaitGroup interface { // AddNotifier adds a notifier to the wait group AddNotifier(ch <-chan struct{}) // WaitForDone will wait for all notifiers to complete up to the given deadline. It will return false if the timeout // was reached, true otherwise WaitForDone(timeout time.Duration) bool }
WaitGroup provides a facility to wait for an arbitrarily size collection of notification channels to be completed
The methods are multi-thread safe, but notifiers added after WaitForDone has been called are not guaranteed to be waited for
func NewWaitGroup ¶
func NewWaitGroup() WaitGroup
Click to show internal directories.
Click to hide internal directories.