我已经读过我们应该总是wait()在循环中调用a :
wait()
while (!condition) { obj.wait(); }
没有循环它工作正常,为什么会这样?
java multithreading
java ×1
multithreading ×1