How to know the thread A that interrupted the thread B that is throwing the InterruptedException
?
No, you could not know which thread triggers the interrupt.
It is kind of status flag, that's it. No matter InterruptedException
or isInterrupted()
, there is no extra information provided.
Further, if you need to cooperate threads in finer grade, try other ways.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With