• Post Reply Bookmark Topic Watch Topic
  • New Topic

what doesm mean daemon?

 
Alessandro Ilardo
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

can anyone explain me what exatly means when a thread is daemon?

Thanks
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24213
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The entire definition: as soon as the only threads running in a JVM are daemon threads, the JVM will exit. Making a thread into a daemon thread doesn't change the way it works at all -- it only changes whether that thread will keep the JVM running or not.
 
Edward Harned
Ranch Hand
Posts: 291
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Daemon is simply a thread that runs in the background.

To quote Wikipedia: A daemon is a computer program that runs in the background, rather than under the direct control of a user; they are usually instantiated as processes. Typically daemons have names that end with the letter "d"; for example, syslogd is the daemon which handles the system log.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24213
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Edward Harned:
Daemon is simply a thread that runs in the background.


Well, no, actually. The term "daemon thread" has a very specific meaning in Java, which I've given above. The more general term that means "background process" is not relevant here.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!