ProtoFlux:Async For: Difference between revisions

From Resonite Wiki
clarify
Give info
Line 21: Line 21:
== Inputs ==
== Inputs ==


=== * ===
=== * ([[Impulses#ASync|ASyncCall]]) ===


Start the execution of this node.
Start the execution of this node.
Line 36: Line 36:


=== LoopStart ([[Impulses#ASync|SyncResumption]]) ===
=== LoopStart ([[Impulses#ASync|SyncResumption]]) ===
Fires after * ([[Impulses#ASync|ASyncCall]]) is called and before any iterations or checks have been done.


=== LoopIteration ([[Impulses#ASync|SyncResumption]]) ===
=== LoopIteration ([[Impulses#ASync|SyncResumption]]) ===

Revision as of 20:30, 16 February 2024

Async For
*
LoopStart
Count
LoopIteration
Reverse
LoopEnd
Iteration
Async

ASync For is a protoflux node that will do a bunch of async tasks in order in an Async context, waiting for each task to be done before moving to the next one. 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 For loop iteration or even before the For loop using a Start ASync Task.

Inputs

* (ASyncCall)

Start the execution of this node.

Count (int)

How many times to execute LoopIteration (SyncResumption)

Reverse (bool)

Whether to start at Count (int) and go backwards.

Outputs

LoopStart (SyncResumption)

Fires after * (ASyncCall) is called and before any iterations or checks have been done.

LoopIteration (SyncResumption)

Fires while the loop is running and after the previous LoopIteration (SyncResumption) or LoopStart (SyncResumption) has finished.

LoopEnd (Continuation)

Fires once the loop has finished all LoopIteration (SyncResumption) in order.

Iteration (int)

The current iteration of the loop.

Examples