374375376377378379380381382383384
val = map.get(i); } synchronized(val) { while (val.get() == -1) { try { val.wait(); } catch (InterruptedException e) { throw new RuntimeException(e); } } val.incr();
394395396397398399400401402403404
val = map.get(i); } synchronized(val) { while (val.get() > 0) { try { val.wait(); } catch (InterruptedException e) { throw new RuntimeException(e); } } val.set(-1);