code: synchronized void get_monitor() throws DevFailed {
  	boolean interupted;
  	Util.out4.println("In get_monitor(), used = " + used);
  
  	final boolean owner_thread = false;
  	/*
  	 * if ((locking_thread != NULL) && (omni_thread::self() ==
  	 * locking_thread)) { owner_thread = true;
  	 * Util.out4.println("owner_thread !!"); }
  	 */
  
  	while (used == true && owner_thread == false) {
  	    Util.out4.println("waiting !!");
  	    interupted = wait_it(_timeout);
  
  	    if (used == true && interupted == false) {
  		Util.out4.println("TIME OUT for thread ");
  		Except.throw_exception("API_CommandTimedOut", "Not able to acquire device monitor",
  			"TangoMonitor.get_monitor");
  	    }
  	}
  	locked_ctr++;
  	if (!owner_thread) {
  	    // locking_thread = omni_thread::self();
  	    used = true;
  	}
      }
docs: ===============================================================