• Thread.sleep()是java提供的函数。在调用该函数的过程中可能会发生InterruptedException异常。

​Thread.interrupt()​

  • , as it will preserve the interrupted state of the thread.