Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AtomicBool ¶
type AtomicBool AtomicInt
type AtomicInt32 ¶ added in v0.0.4
type AtomicInt32 int32
func (*AtomicInt32) Add ¶ added in v0.0.4
func (ai *AtomicInt32) Add(delta int32)
Add int value atomically
func (*AtomicInt32) Load ¶ added in v0.0.4
func (ai *AtomicInt32) Load() int32
Load int value atomically
func (*AtomicInt32) Store ¶ added in v0.0.4
func (ai *AtomicInt32) Store(v int32)
Store int value atomically
type AtomicInt64 ¶ added in v0.0.3
type AtomicInt64 int64
func (*AtomicInt64) Add ¶ added in v0.0.3
func (ai *AtomicInt64) Add(delta int64)
Add int value atomically
func (*AtomicInt64) Load ¶ added in v0.0.3
func (ai *AtomicInt64) Load() int64
Load int value atomically
func (*AtomicInt64) Store ¶ added in v0.0.3
func (ai *AtomicInt64) Store(v int64)
Store int value atomically
type AtomicPointer ¶ added in v0.0.5
type AtomicPointer struct {
// contains filtered or unexported fields
}
func (*AtomicPointer) Load ¶ added in v0.0.5
func (ap *AtomicPointer) Load() unsafe.Pointer
Load ptr value atomically
func (*AtomicPointer) Store ¶ added in v0.0.5
func (ap *AtomicPointer) Store(pointer unsafe.Pointer)
Store ptr value atomically
type NewlessPool ¶
type NewlessPool struct {
// contains filtered or unexported fields
}
func NewNewlessPool ¶
func NewNewlessPool() *NewlessPool
func (*NewlessPool) Get ¶
func (pool *NewlessPool) Get() (v interface{})
func (*NewlessPool) Put ¶
func (pool *NewlessPool) Put(v interface{})
func (*NewlessPool) TryGet ¶
func (pool *NewlessPool) TryGet() (v interface{})
type OneTimeCond ¶
type OneTimeCond struct {
// contains filtered or unexported fields
}
Synchronous condition which can be signalled only once
func (*OneTimeCond) IsSignalled ¶
func (cond *OneTimeCond) IsSignalled() (signalled bool)
Return if the condition is already signalled
func (*OneTimeCond) Signal ¶
func (cond *OneTimeCond) Signal()
Signal the condition
All goroutines waiting for the condition will be notified to continue
func (*OneTimeCond) Wait ¶
func (cond *OneTimeCond) Wait()
Wait for condition to be signalled.
If the condition was signalled before Wait, Wait returns immediately without blocking.
type SyncQueue ¶
type SyncQueue struct {
// contains filtered or unexported fields
}
Synchronous FIFO queue
func (*SyncQueue) Close ¶
func (q *SyncQueue) Close()
Close SyncQueue
After close, Pop will return nil without block, and TryPop will return v=nil, ok=True
func (*SyncQueue) Pop ¶
func (q *SyncQueue) Pop() (v interface{})
Pop an item from SyncQueue, will block if SyncQueue is empty