Difference between revisions of "Execution Method"

From webCoRE Wiki - Web-enabled Community's own Rule Engine
Jump to: navigation, search
(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...")
 
m (Sychronous: Spelling)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 +
 +
=Synchronous=
 +
 
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.
 
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}}
 
{{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''.
+
=Asynchronous=
 +
 
 +
In contrast, this 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
 
//todo: examples

Latest revision as of 21:33, 15 November 2017

Synchronous

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 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

In contrast, this 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