aspose file tools
The moose likes Threads and Synchronization and the fly likes daemon threads Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "daemon threads" Watch "daemon threads" New topic
Author

daemon threads

RAVI BHAWNANI
Greenhorn

Joined: Jan 29, 2001
Posts: 4
why do daemon threads keep on running even when we are delieberately killing the execution of main thread
Rahul Mahindrakar
Ranch Hand

Joined: Jul 28, 2000
Posts: 1831
This is not true. Daemon threads are killed once all the user threads have exited.
Check out the code example below. This example basically creates a daemon thread which is in a while(true) loop to print out "in Daemon thread". If Daemon threads

keep on running even when we are delieberately killing the execution of main thread

then this program should keep printing "in Daemon thread" forever. However this is not so.
RAVI BHAWNANI
Greenhorn

Joined: Jan 29, 2001
Posts: 4
thanks .i have received your mail
soon will be back with new query
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: daemon threads
 
Similar Threads
regarding threads
what is daemon threads
threads dont stop on undeploying application over
tomcat don�t release port 8080 when on shot down
Priority of Daemon threads