Documentation
¶
Overview ¶
Package concurrency contains utilities for goroutines coordination
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executed ¶
type Executed struct {
// contains filtered or unexported fields
}
Executed can be used to wait for something to be executed, it has a similar semantics to sync.Cond, but with a way to know whether it was already executed once and waiting only if that's not the case.
func (*Executed) Broadcast ¶
func (i *Executed) Broadcast()
Broadcast broadcasts execution to waiting goroutines
func (*Executed) BroadcastError ¶ added in v1.27.0
BroadcastError broadcasts execution to waiting goroutines recording the passed error status
type MultipleExecuted ¶
type MultipleExecuted []*Executed
MultipleExecuted can be used to wrap multiple Executed conditions that should all be waited
func (MultipleExecuted) Err ¶ added in v1.27.0
func (m MultipleExecuted) Err() error
Err returns a composition of the errors raised by the individual execution components or nil if there is no error.
func (MultipleExecuted) Wait ¶
func (m MultipleExecuted) Wait()
Wait waits for the execution for all the conditions in a MultipleExecuted