Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Daemon Thread and Non-Daemon Thread

 
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
Marshal
Pie
Posts: 24212
35
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