code: public void lock() {
  		if (cancel != null)
  			return;
  		if (error != null)
  			return;
  		Thread t = Thread.currentThread();
  		if (t == lockingThread) {
  			lockedTimes++;
  			return;
  		}
  		BlockedThreadHandler blockedHandler = null;
  		do {
  			synchronized (this) {
  				if (lockingThread == null) {
  					lockingThread = t;
  					lockedTimes = 1;
  					return;
  				}
  				if (blockedHandler == null)
  					blockedHandler = Threading.getBlockedThreadHandler(t);
  				if (blockedHandler == null) {
  					try { this.wait(0); }
  					catch (InterruptedException e) { /* ignore */ }
  					continue;
  				}
  			}
  			blockedHandler.blocked(this, 0);
  		} while (true);
  	}
docs: Request the lock. If it is already locked this method will block until it become unblocked and the lock has been obtained.