org.eclipse.swt.internal
Class Lock

java.lang.Object
  extended by org.eclipse.swt.internal.Lock

public class Lock
extends java.lang.Object

Instances of this represent a recursive monitor.


Constructor Summary
Lock()
           
 
Method Summary
 int lock()
          Locks the monitor and returns the lock count.
 void unlock()
          Unlocks the monitor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Lock

public Lock()
Method Detail

lock

public int lock()
Locks the monitor and returns the lock count. If the lock is owned by another thread, wait until the lock is released.

Returns:
the lock count

unlock

public void unlock()
Unlocks the monitor. If the current thread is not the monitor owner, do nothing.