Synchronization functions

LotusScript® 4.0 (in Domino® 5.0) includes a new set of primitives to allow LotusScript® agents to synchronize with one another:

CreateLock--finds the lock ID associated with Name. If none exists, the Lock ID is created.

DestroyLock--removes the current link to the lock specified. If the number of links is zero, the lock is destroyed.

CodeLock--acquires the lock specified by ID. If the lock is already held by another agent, the thread stalls until the lock becomes available.

CodeUnlock--releases the lock, making it available for the next agent requesting it.

CodeLockCheck--returns the number of agents waiting for the the specified lock, plus 1.

Sleep--causes a script to pause for at least the number of seconds specified.