LOTUSSCRIPT LANGUAGE
Syntax
CreateLock(lockName)
Elements
lockName
CreateLock will return the lock ID as a simple integer. It will return an error if the platform does not support locks or if there is insufficient shared memory.
Usage
Note that the variable the lock ID is stored in is simply an integer. If the variable goes out of scope the ID will be lost. It can be recovered by calling CreateLock again with the same name. Locks are unique across the current shared memory name space. Locks are freed automatically when the thread exits or may be freed by DestroyLock.
Note When a lock ID is lost DestroyLock cannot be used on the lock and system resources are taken up by the lock until the ID is recovered and the lock destroyed or the agent or thread is exited.
Extended examples: lock functions
See Also