Paranoid Locking

Paranoid locking causes the occurrence to be locked as soon as it is read. This is achieved with the read/lock statement.

You should use this instruction when you read an occurrence of a particular entity into Uniface, if:

  • The user is definitely going to modify that occurrence.
  • The user is going to do so quickly.
  • You do not want anybody else doing anything to the data while the modifications are made.

This saves potential time wasting caused by other people locking or modifying the same occurrence in the meantime.

On the other hand, if users can lock important occurrences for extended periods, the read/lock instruction can cause severe concurrency penalties. Use caution with read/lock.

Related Topics