#68995: Documentation improvements for Mutex.EVENT by abadea release55_base
authorjtulach@netbeans.org
Wed, 07 Dec 2005 10:59:27 +0000
changeset 981742afcac4a2
parent 97 f9ca049fcb43
child 99 eab10c1be646
#68995: Documentation improvements for Mutex.EVENT by abadea
openide.util/src/org/openide/util/Mutex.java
     1.1 --- a/openide.util/src/org/openide/util/Mutex.java	Tue Dec 06 17:11:40 2005 +0000
     1.2 +++ b/openide.util/src/org/openide/util/Mutex.java	Wed Dec 07 10:59:27 2005 +0000
     1.3 @@ -76,7 +76,33 @@
     1.4  * @author Ales Novak
     1.5  */
     1.6  public final class Mutex extends Object {
     1.7 -    /** Mutex that allows code to be synchronized with the AWT event dispatch thread. */
     1.8 +    /** Mutex that allows code to be synchronized with the AWT event dispatch thread.
     1.9 +     * <P>
    1.10 +     * When the Mutex methods are invoked on this mutex, the methods' semantics 
    1.11 +     * change as follows:
    1.12 +     * <UL>
    1.13 +     * <LI>The {@link #isReadAccess} and {@link #isWriteAccess} methods
    1.14 +     *  return <code>true</code> if the current thread is the event dispatch thread
    1.15 +     *  and false otherwise.
    1.16 +     * <LI>The {@link #postReadRequest} and {@link #postWriteRequest} methods
    1.17 +     *  asynchronously execute the {@link java.lang.Runnable} passed in their 
    1.18 +     *  <code>run</code> parameter on the event dispatch thead.
    1.19 +     * <LI>The {@link #readAccess(java.lang.Runnable)} and 
    1.20 +     *  {@link #writeAccess(java.lang.Runnable)} methods asynchronously execute the 
    1.21 +     *  {@link java.lang.Runnable} passed in their <code>run</code> parameter 
    1.22 +     *  on the event dispatch thread, unless the current thread is 
    1.23 +     *  the event dispatch thread, in which case 
    1.24 +     *  <code>run.run()</code> is immediately executed.
    1.25 +     * <LI>The {@link #readAccess(Mutex.Action)},
    1.26 +     *  {@link #readAccess(Mutex.ExceptionAction action)},
    1.27 +     *  {@link #writeAccess(Mutex.Action action)} and
    1.28 +     *  {@link #writeAccess(Mutex.ExceptionAction action)} 
    1.29 +     *  methods synchronously execute the {@link Mutex.ExceptionAction}
    1.30 +     *  passed in their <code>action</code> parameter on the event dispatch thread,
    1.31 +     *  unless the current thread is the event dispatch thread, in which case
    1.32 +     *  <code>action.run()</code> is immediately executed.
    1.33 +     * </UL>
    1.34 +     */
    1.35      public static final Mutex EVENT = new Mutex();
    1.36  
    1.37      /** this is used from tests to prevent upgrade from readAccess to writeAccess