ProtoFlux:Async Sequence: Difference between revisions

From Resonite Wiki
forgot category
no async context
 
(2 intermediate revisions by the same user not shown)
Line 8: Line 8:
|Outputs=
|Outputs=
[
[
{"Name":"Calls", "Multi": 20, "Type":"AsyncCall"}
{"Name":"Calls", "Multi": 3, "Type":"AsyncCall"}
]
]
|}}
|}}


ASync Sequence is a protoflux node that allows for doing a bunch of async tasks, but waiting for each one before continuing to the next. So if you need to write some cloud variables in order, using this node allows for doing such without writing them all at the exact same time like would be done with a [[ProtoFlux:Sequence|Sequence]] preceded or followed by [[ProtoFlux:Start ASync Task|Start ASync Tasks]].
The '''Async Sequence''' performs each of the provided [[async impulses]] in order, waiting for the chain of each impulse to finish before executing the next one.
 
This can be useful for organizational purposes or to avoid code duplication if something needs to be performed after a bunch of branching paths.


== Inputs ==
== Inputs ==
Line 18: Line 20:
=== * ([[Impulses#ASync|AsyncCall]]) ===
=== * ([[Impulses#ASync|AsyncCall]]) ===


Call to start impulsing the list
Start execution of the node.


== Outputs ==
== Outputs ==
Line 24: Line 26:
=== Calls (List of [[Impulses#ASync|AsyncCalls]])===
=== Calls (List of [[Impulses#ASync|AsyncCalls]])===


The list of Async paths to call, waiting for each one to finish.
The list of impulses to fire in order. The impulses are run in [[async flow]], and after the context of the impulse finishes, the next impulse is fired.


== Examples ==
== Examples ==


<gallery widths=480px heights=480px>
== See Also ==
File:Protoflux_example_ASync_Sequence.webp|Example of using a ASync Sequence to request data from a bunch of website pages/endpoints and then write a cloud variable.
 
</gallery>
* [[ProtoFlux:Sequence]] for the synchronous analogue.


[[Category:ProtoFlux:Flow:Async]]
[[Category:ProtoFlux:Flow:Async]]

Latest revision as of 20:59, 29 January 2025

Async Sequence
*
Calls
+
-
Async

The Async Sequence performs each of the provided async impulses in order, waiting for the chain of each impulse to finish before executing the next one.

This can be useful for organizational purposes or to avoid code duplication if something needs to be performed after a bunch of branching paths.

Inputs

* (AsyncCall)

Start execution of the node.

Outputs

Calls (List of AsyncCalls)

The list of impulses to fire in order. The impulses are run in async flow, and after the context of the impulse finishes, the next impulse is fired.

Examples

See Also