Difference between revisions of "Execution Method"
(Created page with "Statements are normally executed one after another. Each statement ''waits'' on the previous statement to complete, before it starts to execute. If the previous statement incl...") |
(No difference)
|
Revision as of 17:21, 13 April 2017
Statements are normally executed one after another. Each statement waits on the previous statement to complete, before it starts to execute. If the previous statement includes a Wait task, all the remaining tasks in the previous statement, and any statement after that, will be delayed. This is known as synchronous, because everything happens in sync, or, in other words, always happening in the same order. Synchronous execution is the default execution of most statements.
Warning: | The every statement, also known as a timer, is an exception to the default rule, because, due to its nature, it always runs asynchronously - see below for more details |
Asynchronous execution, in contrast, allows multiple statements to run out of sync. An asynchronous statement can start a wait period that would delay all the remaining tasks, but the next statements will start executing immediately, without waiting for the asynchronous statement to finish. This means that things can now happen out of order, or out of sync.
//todo: examples