public synchronized void run() {
try {
for (int i = 0; i < 10; ++i) {
consumer.receiveNoWait();
synchronized (consumer) {
consumer.notifyAll();
}
TimeUnit.MILLISECONDS.sleep(1000 + (i * 100));
}
msg = "Should have thrown an IllegalStateException";
} catch (Exception ex) {