Low-level shared variable locking without ATOMIC blocks
This topic contains examples of low-level shared variable locking without using ATOMIC blocks.
Before you begin
About this task
The integration server provides locking around shared variable access to prevent crashes and deadlocks, regardless of whether ATOMIC blocks are used.
Attempting to write to different shared variables will also result in the same exception, as allowing one thread to attempt to take a write lock on one variable while holding a read lock on another could result in a deadlock with a different thread attempting to take the same locks in the opposite order.
These examples are all in a single ESQL node, as propagating from a node while holding a lock is prohibited. The reason for this is that the information on what locks have been taken on a particular thread is stored per-node, so downstream nodes would not know which locks are held by upstream nodes. As no checking could be performed, deadlocks would be possible, and this leads to flows that cannot be shut down.