Best way to stop blocking thread
I am not sure performance forum is right place to put this question...Yet my question is what is the best way to stop a blocking thread(I did google..but could not find good answer so far)? more precisely blocking thread is waiting for a messages on a external messaging system queue, and the system is shutting down.
For non-blocking threads usually I can notify the thread and can make some flag false to come out from while loop inside run() method.
I may want to clean up and close connections before stopping a blocking thread as I can do that in non-blocking threads.
Thanks in advance.