Spawn Expression in Verse
The spawn expression starts one async function invocation, and any expression that follows the spawn is executed immediately while the started async function task continues independently until it completes.
| | |
| --- | --- |
| | # Continues until completed without blocking |
| | spawn{AsyncFunction1()} # Started at same time as expression0 |
| | expression0 # Started at same time as AsyncFunction1() |
Continues until completed without blocking
spawn{AsyncFunction1()} # Started at same time as expression0 expression0 # Started at same time as AsyncFunction1()
Copy full snippet(3 lines long)
The following code shows the syntax for the spawn expression.
| | |
| --- | --- |
| | expression0 |
| | spawn{ expression1 } |
| | expression2 |
expression0 spawn{ expression1 } expression2
Copy full snippet(3 lines long)
The diagram below shows the execution flow of the expressions.
You're reading a preview
The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.
Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.