Documentation Comments
Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.
Reality V15.0 ()
Item Locks (Proc) (m618402+itemlocks.htm)
Item locks can be used to prevent an item from being updated by more than one process at the same time. This maintains the integrity of the database while allowing multiple users access to other items in the same group.
Proc allows a reality process to take multiple locks on the same item (this will normally occur if the item is processed by a number of different routines, each of which locks the item) - each of these locks must be separately released.
The number maximum number of item locks that can be held on the database is user-defined.
In a Proc, an item lock is set by executing the F-UREAD command.
You cannot lock an item if it is locked by another process; F-UREAD waits until the lock is released before continuing.
An item lock can be set on a nonexistent item. When creating a new item, the item can be locked before it is written to disk. The lock can also be cleared if a write operation is not carried out.
Item locks are cleared by one of the following:
Note: Within a transaction, release is deferred until the transaction is completed or aborted.
When using transaction handling and a transaction is in progress, the release of item locks set within a transaction is deferred until the transaction is completed or aborted. Therefore avoid the use of large transactions, particularly those started from TCL, since the holding of many locks can lead to a gradual system paralysis.