


CodePudding user response:
Because you while statement did not lock, so in the judgment, while (tick> 0) when they have a problem, for example tick=1, three threads are meet the conditions, so you need to determine whether the tick in the synchronized code block is greater than zeroCodePudding user response:
The building Lord, my name is changed to for me, you are the light, even better,CodePudding user response:
Just see the building has a 19 years of looking for a job, just have to see the latest study, want to ask the building Lord, development work before looking for how, want to know about the, I also want to go after the training, and then turned to look for a jobCodePudding user response:
The original poster can go to understand the "double check"CodePudding user response:
Lock while also in good, in fact you so the whole way in the lock, can try to lock method