XenoGuard Documentation


 Actions » Programming » Flow Control » Parallel 

With Parallel you execute actions within independent branches simultaneously. Each branch can contain multiple actions. The Parallel action ends only when both inner branches have been completely processed. It does not matter whether one branch is faster or slower than the other.

Information Note: On a PC with multiple CPU cores, the branches run on different cores, making a real parallel execution possible. You need XenoGuard-Plus or XenoGuard-Premium to use the action.

[-] Hide
  1. Open the Programming node in the Workspace Explorer.
  2. Open the Flow Control node, select the Parallel action.


The action has the following input parameters:

name Description
Parallel-1 Contains actions that will run in the 1st parallel branch.
Parallel-2 Contains actions that will run in the 2nd parallel branch.

Example 1 (Simultaneous playback of an audio file and a voice output):

This example plays an audio file from a specified folder and performs a voice output at the same time. The text for the voice message was passed from two local variables named Male Voice and Female Voice with the Text data type. After the audio file and the voice output are played simultaneously, a text is output via Message Box.

Example 2 (Run two action scripts concurrently):

This example simultaneously executes the action scripts, Salary.xen and Income Tax.xen with values passed from local variables namely Gross Pay, Deductions, and Tax Rate with Floating Point as data type. The Results of the action scripts were subtracted and then output via Message Box.

See other flow control actions: 

For Loop
For Each
On Error Continue
On Error GoTo
Abort on Error