Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WaitAtGroup ¶
func WaitAtGroup(futures []Future) []interface{}
WaitAtGroup wait until all Futures are executes
Types ¶
type Future ¶
type Future interface {
Await() interface{}
}
Future interface has the method signature for await
func ExecFuture ¶
func ExecFuture(arg interface{}, f func() interface{}) Future
ExecFuture executes the async function and set the the argument
func ExecFutureGroup ¶
func ExecFutureGroup(fg []FutureStack) []Future
ExecFutureGroup executes an group of Futures and returns assotiated future handler
type FutureStack ¶
FutureStack struct contains the AwaitFunc and argurments
note: this mght not the best way to handle the argument delivery see: https://go.dev/blog/context#TOC_3.2.
func (FutureStack) Await ¶
func (f FutureStack) Await() interface{}
Await creates the context including arfgument, and blocks til any execution is done.
Click to show internal directories.
Click to hide internal directories.