wood burning stoves*
The moose likes Java in General and the fly likes regarding daemon thread in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "regarding daemon thread in java" Watch "regarding daemon thread in java" New topic
Author

regarding daemon thread in java

santhosh kumar vk
Ranch Hand

Joined: Aug 25, 2009
Posts: 144
hi

This is santhosh can you tell me what is daemon thread and use of the daemon thread

Thanking you.

by santhosh
Guido Granobles
Greenhorn

Joined: Sep 11, 2010
Posts: 22
You can visit my blog. There I explain how to work with daemons threads in Java.
Running a Java program as a daemon.


http://guido-granobles.blogspot.com
Sandeep Sanaboyina
Ranch Hand

Joined: Dec 14, 2009
Posts: 72
A daemon thread is similar to any other thread in java. But, if a thread is set as a daemon, it will keep running till there is at least one non daemon user defined thread running. Once all the non daemon user defined threads stop, the daemon threads will automatically stop.

We can use this, for example, to run monitor threads on applications. After all the processing is done when all the user defined non daemon threads stop, the daemon thread will automatically stop and shut down the JVM. If this monitor thread is not a daemon, the JVM will still be running because of it, though the processing is complete.


They say you have to be the first, the best or different. I say, is it too much to ask for all three.
Muhammad Khojaye
Ranch Hand

Joined: Apr 12, 2009
Posts: 449

santhosh kumar vk wrote:can you tell me what is daemon thread and use of the daemon thread

Also, search this forum. I am sure you will get many valuable replies.


http://muhammadkhojaye.blogspot.com/
Muhammad Khojaye
Ranch Hand

Joined: Apr 12, 2009
Posts: 449

Granobles, Welcome to Ranch
 
 
subject: regarding daemon thread in java
 
Similar Threads
"Top Ten Topics that Everyone Thinks are on the SCJP Exam, but Aren't "- Bert Bates
Are swings part of new Exam?
Infinite looping in 'for' and 'while' loops
Multithreading
How to handle/kill a hung thread