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

release()

Call this method to release a semaphore that was allocated using rb.semaphore.lock

Syntax

number = rb.semaphore.release(semaphoreName, ownershipID)

Parameters

The 'release' method takes 2 parameters:

Name Type/Value Range/Length Description
semaphoreNamestring  Required. The name of the sempahore to be released.
ownershipIDstring  Required. The unique ownership string returned from the successful lock request

Results

The 'release' method returns number:

Type/Value Range/Length Description
number   0 if the semaphore wasn't owned by the caller or 1 if it was owned and has been released

Remarks

This method will attempt to release a semaphore locked with rb.semaphore.lock. The 'ownershipID' oacts like a key. It must match the ownership ID returned from rb.semaphore.lock to the Presentation Engine instance that successfully locked the semaphore.

Example

          var key = rb.semaphore,lock('my semaphore', 60, 'Locking page access');
          if (key!=null) {
            // Do critical work here
            rb.semaphore.release('my semaphore', key);
          }
        
Whitebeam release 1.3.36
(loadtime : 178ms)