Class Lock

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

public class Lock extends Object
Instances of this represent a recursive monitor. Note that this is an empty implementation which does not actually perform locking.
  • Constructor Details

    • Lock

      public Lock()
  • Method Details

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