@Override public void run() { while (true) { TestProcedureWithEvent proc = (TestProcedureWithEvent)sched.poll(); if (proc == null) continue; proc.getEvent().suspend(); waitQueue.add(proc); proc.getEvent().suspendIfNotReady(proc); LOG.debug("WAIT " + proc.getEvent()); if (waitCount.incrementAndGet() >= NRUNS) { break; } } } };
@Override public void run() { while (true) { TestProcedureWithEvent proc = (TestProcedureWithEvent)sched.poll(); if (proc == null) continue; proc.getEvent().suspend(); waitQueue.add(proc); proc.getEvent().suspendIfNotReady(proc); LOG.debug("WAIT " + proc.getEvent()); if (waitCount.incrementAndGet() >= NRUNS) { break; } } } };
@Override public void run() { while (true) { TestProcedureWithEvent proc = (TestProcedureWithEvent)sched.poll(); if (proc == null) continue; proc.getEvent().suspend(); waitQueue.add(proc); proc.getEvent().suspendIfNotReady(proc); LOG.debug("WAIT " + proc.getEvent()); if (waitCount.incrementAndGet() >= NRUNS) { break; } } } };