KB-127253: semaphore.enter & semaphore.exit

semaphore.enter & semaphore.exit

The command semaphore.enter can be used to limit the number of parallel processes that the processor carries out. If the command name was given for the script section semaphore.enter<Name>, then all other scripts will land in a queue when this script is executed. This argument can be used to determine how many processes with the name may be carried out at the same time. semaphore can only be used once per script.

The semaphore.exit command sets the end of the critical logic section.

If a semaphore.exit is not set, the script will quit the logic section automatically, when it ends.

Syntax:

semaphore.enter `<Name>` [max:n]

Example

// A script can only be run once:
semaphore.enter KukaKRC4
// critical logic, that can only be triggered once.
semaphore.exit

// A script may only be run a max 5 times:
semaphore.enter KukaKRC4 max:5
// critical logic, that may only be run a max 5 times.
semaphore.exit

Last update: September 15, 2023

Related Articles

IMPRINT | PRIVACY POLICY | COOKIE POLICY

Privacy Preference Center