Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

regarding daemon thread in java

 
santhosh kumar vk
Ranch Hand
Posts: 152
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can visit my blog. There I explain how to work with daemons threads in Java.
Running a Java program as a daemon.
 
Sandeep Sanaboyina
Ranch Hand
Posts: 72
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Muhammad Khojaye
Ranch Hand
Posts: 449
IntelliJ IDE Java Scala
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Muhammad Khojaye
Ranch Hand
Posts: 449
IntelliJ IDE Java Scala
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Granobles, Welcome to Ranch
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic