The only diffrence between daemon thread and user thread is daemon threads are for serving user threads.That is if all the user threads get over then all the daemon thread are terminated and application exits.
Example garbage collector thread
Joined: May 05, 2004
Hi patrick J. d'cousta,
But, if I create an user thread and a daemon thread, what advantages I have with daemon thread over user thread? In otherwords, when we need to create/use daemon threads?
Thanks in advance, Ganesh..
patrick J. d'cousta
Joined: Oct 25, 2005
Ganesh Imagine u are writing a application where there are two tasks
1.Number of thread do some work and dump the output in a directory 2.One thread is supposed to run once a while and purge this output