Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FunctionQueue ¶
type FunctionQueue struct {
// contains filtered or unexported fields
}
func NewFunctionQueue ¶
func NewFunctionQueue() *FunctionQueue
NewFunctionQueue returns a FunctionQueue that will be used to execute functions in the same order they are enqueued.
func (*FunctionQueue) Enqueue ¶
func (fq *FunctionQueue) Enqueue(f func() error)
Enqueue f to the queue. Blocks if the queue is full. Returns immediately if the queue has been closed.
func (*FunctionQueue) Wait ¶
func (fq *FunctionQueue) Wait() error
Wait for the queue to be stopped.
Returns any error returned by an enqueued function.
Click to show internal directories.
Click to hide internal directories.