FlowExecutor
has await(): RT
to enable the parent flow to await its result.
Here’s an example:
const result = flow.await();
will make the currently executing flow suspend until the awaited flow
is complete.
FlowFunction
) and hence an edge would be rendered.Try playing with run()
and await()
and see how the playground changes!std.awaitAll()
and std.awaitRace()
.
std.awaitAll
FlowExecutor
and returns an array
corresponding to results of given FlowExecutor
s. For example:
std.awaitRace
FlowExecutor
but returns a single value corresponding to the flow which completed first. If a flow wins the race, the remaining flows are cancelled.
For example: