Execution Method

From webCoRE Wiki - Web-enabled Community's own Rule Engine
Revision as of 21:33, 15 November 2017 by Ipaterson (talk | contribs) (Sychronous: Spelling)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Share on FacebookShare on TwitterShare on Google+Share on LinkedInShare on DiggShare on deliciousShare on redditShare on StumbleUpon

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