|
Whitebeam Template Reference Documentation
|
System Template
lock()
Call this method to create/lock a semaphore
See Also
rb.semaphore.release Syntax
string = rb.semaphore.lock(semaphoreName, maxLifeTime, description)
Parameters
The 'lock' method takes 3 parameters:
Name | Type/Value | Range/Length | Description | semaphoreName | string | | Required. A name that uniquely identifies the semaphore you want to lock | maxLifeTime | number | | Required. Maximum time this lock should remain in place before automatically being released by the system | description | string | | Required. An optional parameter primarily used by debug. This text is returned by the semaphore iterator. |
Results
The 'lock' method returns string:
Type/Value | Range/Length | Description |
string |
  |
Returns either a unique ownership handle for a successful lock, or null indicating the semaphore was already locked.
|
Remarks rb.semaphore.lockThis method should be called to request ownership of a specific named semaphore. The parameters to the
call are the name (string) of the semaphore that is being requested and a lifetime. The lifetime is the
maximum period for which the semaphore is to be held before being automatically released. Generally
all semaphores should be explicitly released. This lifetime parameter is used in the situation
where the Presentation Page fails to call rb.semaphore.release. return: If semaphore ownership is granted then this method returns a unique ownership string to the caller. This
string must be used in conjuntion with rb.semaphore.release in order to release the semaphore. |
|
(loadtime : 94ms) |