Parallel Command (APL 1.0 to 2023.2)


Run a series of commands in parallel. The Parallel command starts running all child commands simultaneously. The Parallel command finishes when all the defined child commands have finished. When the Parallel command stops, all running commands stop.

Properties

The Parallel command has the properties shown in the following table, in addition to the common command properties. Set the type property to Parallel.

In the following table, the "Default" column shows "Required" for properties that must have a value for the command to run. Otherwise it displays the default value, which might be none.

Property Type Default Description
commands Array of commands REQUIRED An unordered list of command to run in parallel

In fast mode, the parallel command runs all of the sub-commands in parallel, but without delays (giving a net zero duration).

commands

An un-ordered array of commands to run in parallel. Once all commands have finished running, the Parallel command finishes. The delay value set for the Parallel command is added to the delay value set for each of the commands in the array. In the following example, the first SendEvent command starts after 1500 milliseconds, and the second SendEvent command after 750 milliseconds, which means the second SendEvent command starts before the first.

{
  "type": "Parallel",
  "delay": 500,
  "commands": [
    {
      "type": "SendEvent",
      "delay": 1000
    },
    {
      "type": "SendEvent",
      "delay": 250
    }
  ]
}

Was this page helpful?

Last updated: frontmatter-missing