• Post Reply Bookmark Topic Watch Topic
  • New Topic

Daemon Thread and Non-Daemon Thread  RSS feed

 
Saurabh Saha
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I want to know what is Daemon Thread and how it is different from
Non-Daemon Thread.

Thanks & Regards,
Vivek Mishra
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's just a flag in the Thread object. The JVM will continue to run only as long as non-daemon threads exist. As soon as the only running threads have the daemon property set, the JVM will exit. That's it -- nothing more.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!