LOCKWAIT |
lockwait sets the number of seconds that each attempt will last at locking a record, file, or symbol.
[S]lockwait Integer
# Back up the current behavior
[L]SVGWAIT= [S]lockwait
# Limit the length of the lock attempts to
five seconds.
[S]lockwait = 5
Trbegin
Raz BADLOCK
Lock COMPTEUR
If fstat
BADLOCK = 1
Rollback
Else
[C]COMPTEUR += 1
Commit
Endif
lockwait is an Adonix system variable of the Integer type, which allows you to set the maximum of seconds that each lock attempt will last via the Lock and Readlock instructions.
lockwait can have all values from 2^31 -1 to 2^31. If its value is negative, the attempt time will be unlimited. If its value is null, a single attempt will be made.
The Lock (or Readlock) syntax With lockwait = allows you to assign this variable for a short while.
This instruction is not interruptible - even if the program is (by Inter).
lockwait is not taken into account by the For, With, Lock, and Update instructions. A single attempt will be made for these instructions.
No associated error
LOCK - READLOCK - FOR - UPDATE
|
|