The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2001



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


Daemon thread is not like a UNIX daemon!

Posted by Mugizi Rwebangira on July 12, 2001 at 1:49 PM

In UNIX a daemon is always running even if no users are logged in.
Daemon thread depends on other processes to be running.
If no non-daemon threads exist, daemon thread is killed.
So the explanation provided above by
appears most correct.

They cannot be used to run a "main thread" as they will be killed
if no non-daemon thread exists. They can be used to run
supporting threads (e.g. garbage collection).

At least this is my understanding.

What I am wondering:- Is it possible to create a thread
that runs all the time [even if I log off the machine](under W2K)
without registering it as a "service"?


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us