When a running thread is in wait, sleep, join
, it is explicitly called interrupt()
After a normal running thread calls the interrupt()
method, the interrupt status of the current thread will be set to true, but the execution of the thread will not be affected.
You can operate according to the actual situation or check whether the business code is used incorrectly.