Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AtomicBool ¶
type AtomicBool int32
Thread safe atomic bool
func NewAtomicBool ¶
func NewAtomicBool(value bool) *AtomicBool
NewAtomicBool creates an AtomicBool with given default value
func (*AtomicBool) CompareAndSet ¶
func (ab *AtomicBool) CompareAndSet(current, new bool) bool
CompareAndSet sets value to new if current is equal to the current value
type ConcurrentStringSet ¶
type ConcurrentStringSet struct {
// contains filtered or unexported fields
}
ConcurrentStringSet is a thread-safe set of string values
func NewConcurrentStringSet ¶
func NewConcurrentStringSet() *ConcurrentStringSet
Creates a new ConcurrentStringSet
func (*ConcurrentStringSet) Add ¶
func (css *ConcurrentStringSet) Add(value string)
Adds a string to the set
func (*ConcurrentStringSet) Contains ¶
func (css *ConcurrentStringSet) Contains(value string) bool
Whether or not the set contains a string
func (*ConcurrentStringSet) Remove ¶
func (css *ConcurrentStringSet) Remove(value string)
Removes a string from the set
type WaitChannel ¶
type WaitChannel interface { Add(delta int) Done() Wait() <-chan struct{} }
WaitChannel behaves like a WaitGroup, but returns a channel on Wait()
func NewWaitChannel ¶
func NewWaitChannel() WaitChannel
Click to show internal directories.
Click to hide internal directories.