Updated on 2023-06-28 GMT+08:00

Variable Read Rules

Table 1 lists the rules for reading manually specified or imported variables when different variable read modes and sharing modes are selected.

Table 1 Variable read rules

Variable Read Mode

Variable Sharing Mode

Description

Example

Sequential

Case

Each concurrency reads a variable value in sequence.

For example, for a task with a concurrency of 10, each concurrency reads a variable value in sequence.

Sequential

Concurrency

Each concurrency copies a variable with the same name for use. Different concurrent requests read the variable values in sequence and do not affect each other.

For example, for a task with a concurrency of 10, each concurrency reads the copied variable values in sequence.

Random

Case

Each concurrency randomly reads a variable value.

For example, for a task with a concurrency of 10, each concurrency randomly reads a variable value.

Random

Concurrency

Each concurrency copies a variable with the same name for use. Different concurrencies read the variable values randomly and do not affect each other.

For example, for a task with a concurrency of 10, each concurrency reads the copied variable values randomly.

Assume that the number variable has three values: 1, 2, and 3, and there are two concurrencies: A and B.
  • In sequential mode:

    Case mode: A reads 1 of number, and B reads 2 of number. The process goes on cyclically.

    Concurrency mode: A reads a copied variable number starting from 1. Concurrency mode: B also reads a copied variable number starting from 1.

  • In random mode:

    The method of reading variable values is the same as that in sequential mode, regardless whether the Case or Concurrency sharing mode is used.