CriticalSection

(Engine-Level Function)

Description: Marks a section of a module as a critical section and will not allow interruption of its execution by other threads.
Returns: Nothing
Usage: Script Only.
Function Groups: Compilation and On-Line Modifications,  Basic Module
Related to:

Execute

Format: CriticalSection(Statement1, Statement2, [Statement3, …])
Parameters:  
Statement1, Statement2, Statement3, …
Required. Any expressions to be executed. Any number of parameters may be used.
Comments: This statement works in a manner similar to Execute, but on the threaded level.

Example:

  If 1 Main;
  [
    IfThen(Valid(level), 
           CriticalSection(temp = a, 
                           a = b, 
                           b = temp ) ); 
  ]