ASync While is a ProtoFlux node that will wait for every ASync node fired by LoopStart (AsyncCall) and LoopIteration (AsyncCall) to finish their execution before firing the next impulse. This is useful if you want to do a bunch of GET String requests but you need to wait for the previous one to be done before doing the next, for a specified number of times. This does not behave the same as using a Start ASync Task on every While loop iteration or even before the While loop using a Start ASync Task.
Inputs
* (IAsyncOperation)
Call this to start execution of the loop.
Condition (bool)
The execution will check this after every finished LoopIteration (AsyncCall) and will fire the next LoopIteration (AsyncCall) if the provided Condition is true.
Outputs
LoopStart (AsyncCall)
Fires once * (IAsyncOperation) is called before even checking if this node can execute.
LoopIteration (AsyncCall)
Fires once the previous LoopIteration (AsyncCall) has fired and finished or LoopStart (AsyncCall) has fired and finished.
LoopEnd (Continuation)
Fires after a LoopIteration (AsyncCall) has fired and Condition (bool) is false.
Example
-
ASync while being used to do website requests repeatedly until X becomes true.