instanceInObject.wait();
if (delay == -1) { System.out.println("waiting for signal"); instanceInObject.wait(); } else { System.out.println("waiting for signal with delay " + delay); instanceInObject.wait(delay); }
	public Signal getNextSignal(Debug debugObject) throws LemRuntimeException {		synchronized (instanceInObject) {				while (true) {				if (!debugObject.isRunning())					return null;				if (signalSelfQueue.size() > 0)					return (Signal)signalSelfQueue.remove(0);				if (instanceInObject.propogateNextSignalSelf(debugObject))					continue;									if (signalQueue.size() > 0)					return (Signal)signalQueue.remove(0);				if (instanceInObject.propogateNextSignal(debugObject))					continue;				try {					instanceInObject.wait();					/**					 * After taking instanceInObject's lock, we must					 * always recheck this Instance's queue because					 * another instance may have propogated a signal					 * from the runtime.Object.					 *					 * So go back to the top.					 */				} catch ( Exception e ) {					e.printStackTrace();				}			}		}	}