Whitebeam Template Reference Documentation

Site Map
 
Home
 
Application Guide
Reference
  Installation
  Configuration
  XML Markup
  JavaScript Classes
  ROM
  Templates
  Environment
  Dev Process
  Tools
  External Links
  Example libraries
Community
Contact Whitebeam
To-Do
Download
Credits
Licence
Whitebeam Users
 
 
 

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
semaphoreNamestring  Required. A name that uniquely identifies the semaphore you want to lock
maxLifeTimenumber  Required. Maximum time this lock should remain in place before automatically being released by the system
descriptionstring  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.lock

This 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.

Whitebeam release 1.3.36
(loadtime : 112ms)