This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I wrote this simple program to learn how to use Poison Pill pattern to terminate threads. It runs to completion but after all the threads are done processing, the application hangs for few minutes before exiting code 0.
I've included the jstack output at the end. I had originally written this program to use Thread and Runnable and it worked perfect, ie, without hanging for few minutes before exiting. Any help or hint is appreciated.