Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Destroyable ¶
Destroyable is a wrapper for any object that allows an atomic destroy operation to be performed, and will monitor if other functions are called after the object has already been destroyed.
type LazyLoader ¶
type LazyLoader interface {
Load() (interface{}, error)
}
LazyLoader allows a function to be lazily atomically loaded.
func NewLazyLoader ¶
func NewLazyLoader(f func() (interface{}, error)) LazyLoader
NewLazyLoader creates a new LazyLoader.
type VolatileBool ¶
type VolatileBool interface { // Get the current value. Value() bool // Set the value to newBool, and return oldBool == newBool. CompareAndSwap(oldBool bool, newBool bool) bool }
VolatileBool is a volatile bool.
TODO(pedge): Is this even needed? Need to understand go memory model better.
func NewVolatileBool ¶
func NewVolatileBool(initialBool bool) VolatileBool
NewVolatileBool creates a new VolatileBool.
Click to show internal directories.
Click to hide internal directories.