Java / Concurrent collections
How to stop a running thread in Java?
To stop threads in Java, we rely on a cooperative mechanism called Interruption. To stop a thread, all we can do is deliver it a interrupt signal, requesting that the thread stops itself at the next available opportunity. This means that threads could only signal other threads to stop, not force them to stop.
More Related questions...