I think the threshold is not less than 1000.

old (HH)
First let us ignore the time consumed by executing the code except Thread.sleep().
Second let us ignore the time deviation caused by the kick of the machine's time clock, other processes running, system management, etc.
Then the threshold of the sleeping time of the main thread should be 9999 or less, not less than 1000.
2000-11-12 -05:00

回到话题: Toy code for Java Thread

回到论坛: HOME枫下论坛枫下论坛主坛工作学习IT杂谈