Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AtomicBool ¶
type AtomicBool uint32
An AtomicBool is an atomic implementation for boolean values.
func ForAtomicBool ¶
func ForAtomicBool(val bool) *AtomicBool
ForAtomicBool returns an AtomicBool with given val.
func (*AtomicBool) CompareAndSwap ¶
func (b *AtomicBool) CompareAndSwap(old, val bool) bool
CompareAndSwap compares current value with given old, if equals, set to given val.
func (*AtomicBool) True ¶
func (b *AtomicBool) True() bool
True returns true if current value is true.
type DoneChan ¶
type DoneChan struct {
// contains filtered or unexported fields
}
A DoneChan is used as a channel that can be closed multiple times and wait for done.
func (*DoneChan) Close ¶
func (dc *DoneChan) Close()
Close closes dc, it's safe to close more than once.
func (*DoneChan) Done ¶
func (dc *DoneChan) Done() chan lang.PlaceholderType
Done returns a channel that can be notified on dc closed.
Click to show internal directories.
Click to hide internal directories.