• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multithreading

 
manoj Mahadik
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is demon thread in java multithreading?
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a good question for the Threads and Synchronization forum and I am moving it there!
 
ali farid
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A daemon thread is a low priority thread that runs in the background. e.g garbage collector
If you make a thread a daemon thread calling setDaemon(true);
When all the non daemon threads complete, the program terminates.
If a thread is a daemon, then any threads it creates will automatically be daemons.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic