Signal s; while (true) { if (signalSelfQueue.size() > 0) { s = (Signal)signalSelfQueue.remove(0); } else if (signalQueue.size() > 0) { s = (Signal)signalQueue.remove(0); } else { instanceInObject.propogateNextSignal(); continue;
synchronized (instanceInObject) { while (true) { if (signalSelfQueue.size() > 0) { return (Signal)signalSelfQueue.remove(0); } else if (signalQueue.size() > 0) { return (Signal)signalQueue.remove(0); }  if (instanceInObject.propogateNextSignal()) {  continue; }  instanceInObject.wait();
    public Signal getNextSignal() throws LemRuntimeException    {	Signal s;	while (true) {		if (signalSelfQueue.size() > 0) {			s = (Signal)signalSelfQueue.remove(0);		} else if (signalQueue.size() > 0) {			s = (Signal)signalQueue.remove(0);		} else {			instanceInObject.propogateNextSignal();			continue;		}		break;	}	return s;    }