sysLock

Description

Creates a named lock. Scripts using the same lock key will be blocked and wait for the current script to release the lock. Note that this does not prevent the issue from being edited or otherwise changed by other means or plugins. This lock only makes sense for the SIL scripts. Locks will be cleared at the termination of the script or when the script currently holding the lock calls sysUnlock(lockKey). Also note also the locks are not guaranteed to be re-entrant.

Parameters

Return Type

None

Examples

Example 1

sysLock("TEST-123");

Issue TEST-123 is now locked and can not be edited by outside of the script by other SIL scripts calling sysLock with the same lock key, in this case 'TEST-123'.

Example 2

Similar to the example above but uses the package.

use "system"; lock("TEST-123");

Issue TEST-123 is now locked and can not be edited by outside of the scriptby other SIL scripts calling sysLock with the same lock key, in this case 'TEST-123'.

See also

Peacock