Page History
Table of Contents |
---|
Purpose
Introduction
- The Lock Instruction is used to specify Specify a number of job nodes for mutual exclusion to prevent such jobs from being executed in parallel.
- Mutual exclusion is based on Resource Locks, i.e. semaphores, that can be used either exclusively or that can be shared within limits.
- Exclusive Resource Lock: only one Lock Instruction can hold the Resource Lock at any given time. Any further Lock Instructions that try to acquire the same Resource Lock have to wait.
- Shared Resource Lock: the Resource Lock is assigned a limit that can be shared by a number of Lock Instructions. Each Lock Instruction carries a weight that counts towards the Resource Lock's limit.
- Jobs that wait to acquire a Resource Lock do not consume resources such as CPU. Orders that wait for a Resource Lock are in a WAITING state, see JS7 - Order State Transitions.
- If a job within a Lock Instruction fails then the order is considered being failed. In this situation the Resource Lock is still in use by the Lock Instruction.
- Note that Lock Instructions can be nested in a workflow that acquires a number of Resource Locks. This adds complexity to your workflows that should be managed to prevent deadlocks and not to block a number of Resource Locks for a longer time by failed orders.
...
Resource Lock
A Resource Lock is easily configured by assigning a name and a limit for parallel access.
...
Overview
Content Tools