     public native function lock() :void
 
     /**
-     * Attempt to acquire ownership of this mutex.
-     *
-     * If and only if the mutex is available, acquire it,
-     * increase its lock count, and immediately return true.
-     * Otherwise, do not acquire the mutex and immediately return false.
-     * Do all of the above atomically.
-     *
-     * If the mutex is already owned by the current thread/worker,
-     * the lock count is increased and no other action occurs.
-     *
-     * @return true if the lock was acquired, false otherwise.
+     * Acquires ownership of the mutex if it is available. Otherwise, calling 
+     * this method returns <code>false</code> and code execution continues 
+     * immediately.
+     *
+     * <p>Once the current worker has ownership of the mutex, it can safely 
+     * operate on the shared resource. When those operations are complete, call 
+     * the <code>unlock()</code> method to release the mutex. At that point the 
+     * current worker should no longer access the shared resource.</p>
+     *
+     * @return <code>true</code> if the mutex was available (and is now owned 
+     * by the current worker), or <code>false</code> if the current worker did 
+     * not acquire ownership of the mutex
      *
      * @langversion 3.0
      * @playerversion Flash 11.4	

final public class Condition 
{
    /**
     * The constructor for condition variables.
     *
     * @param mutex the mutex associated with the condition
     *
     * @langversion 3.0
     * @playerversion Flash 11.4	

include "api-versions.as"

/**
 * The Mutex (short for "mutual exclusion") class provides a way to make sure 
 * that only one set of code operates on a particular block of memory or other 
 * shared resource at a time. The primary use for a Mutex is to manage code in 
 * different workers accessing a shareable byte array (a ByteArray object whose 
 * <code>shareable</code> property is <code>true</code>). However, a Mutex can be 
 * used to manage workers' access to any shareable resource, such as an AIR native 
 * extension or a filesystem file. No matter what the resource, the purpose of 
 * the mutex is to ensure that only one set of code accesses the resource at a time.
 *
 * <p>A mutex manages access using the concept of resource ownership. At any 
 time a single mutex is "owned" by at most one worker. When ownership of a 
 mutex switches from one worker to another the transision is atomic. This 
 guarantees that it will never be possible for more than one worker to take 
 ownership of the mutex. As long as code in a worker only operates on a shared 
 resource when that worker owns the mutex, you can be certain that there will 
 never be a conflict from multiple workers.</p>
 * 
 * <p>Use the <code>tryLock()</code> method to take ownership of the mutex if 
 * it is available. Use the <code>lock()</code> method to pause the current 
 * worker's execution until the mutex is available, then take ownership of the 
 * mutex. Once the current worker has ownership of the mutex, it can safely 
 * operate on the shared resource. When those operations are complete, call the 
 * <code>unlock()</code> method to release the mutex. At that point the current 
 * worker should no longer access the shared resource.</p>
 *
 * <p>The Mutex class is one of the special object types that are shared 
 * between workers rather than copied between them. When you pass a mutex from 
 * one worker to another worker either by calling the Worker object's 
 * <code>setSharedProperty()</code> method or by using a MessageChannel object, 
 * both workers have a reference to the same Mutex object in the runtime's memory.</p>
 *
 * @see flash.system.Worker Worker class
 * @see flash.utils.ByteArray#shareable ByteArray.shareable property
 * @see flash.concurrent.Condition Condition class
 *
 * @langversion 3.0
 * @playerversion Flash 11.4	
