How to stop a thread that is waiting for input?
posted 12 years ago
If your inter-thread communication uses the wait()/notify() mechanism, -- you can do just that, -- notify the waiting thread so that it can resume. If the thread in question contains a while loop as part of its run() method, you can set a boolean to terminate to exit from that loop.
author and iconoclast