CodeLock function (LotusScript® Language)

Acquires the lock specified by ID.


CodeLock ( lockID )



ID of lock to be locked (assigned by LotusScript® through CreateLock)

Return values

CodeLock will return TRUE, if the lock is acquired.


Acquires the lock specified by ID. If the lock is already held by another agent, the thread stalls until the lock becomes available. Bear in mind that CodeLock and CodeUnLock should always be done in pairs; failure to adhere to this practice will lead to unexpected results.

Extended examples: lock functions