Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Promise ¶
type Promise interface { IsComplete() bool Complete(errors []error) Await() []error AwaitUntil(timeout time.Duration) []error AndThen(f func([]error)) AndThenUntil(timeout time.Duration, f func([]error)) }
A disposable write-once latch, to act as a synchronization barrier to signal completion of some asynchronous operation (successful or otherwise).
Functions that operate on this type (IsComplete, Complete, Await, AwaitUntil) are idempotent and thread-safe.
func NewPromise ¶
func NewPromise() Promise
type RendezVous ¶
type RendezVous interface { IsComplete() bool A() B() }
A reciprocal promise that makes it easy for two coordinating routines A and B to wait on each other before proceeding.
func NewRendezVous ¶
func NewRendezVous() RendezVous
Click to show internal directories.
Click to hide internal directories.