aspose file tools
The moose likes Threads and Synchronization and the fly likes ExecutorService is causing the program to hang for few minutes Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "ExecutorService is causing the program to hang for few minutes" Watch "ExecutorService is causing the program to hang for few minutes" New topic
Author

ExecutorService is causing the program to hang for few minutes

Michael Henderson
Greenhorn

Joined: Feb 22, 2011
Posts: 2
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.
thank you




jstack output is


 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: ExecutorService is causing the program to hang for few minutes
 
Similar Threads
Thread Hangs at SocketInputStream.read0
Server boot time issue
Tomcat hanging on shutdown
JBoss deployment issues
Help with thread dump