| Author |
daemon thread and heavyweight concept
|
sam mitwa
Greenhorn
Joined: Mar 27, 2005
Posts: 13
|
|
what is the difference between daemon thread and user thread i m not able to get it please help me and why we say thread as heavyweight process; and what is light weight process i m madly confused between these concept i just crammed not understood can anybody help me
|
 |
Corey McGlone
Ranch Hand
Joined: Dec 20, 2001
Posts: 3271
|
|
A User Thread will always run to completion, whether that completion happens normally or because of some abrupt termination (such as an unchecked/uncaught exception). A Deamon Thread will run until it completes or until all User Threads have completed. Daemon threads make excellent "behind the scenes" processes for things that must happen in the background but can be terminated when the application ends - garbage collection is a great example of a process that could be handled with a daemon thread. Once all User Threads complete, any Deamon Threads that are still running are automatically halted and the application terminates.
|
SCJP Tipline, etc.
|
 |
 |
|
|
subject: daemon thread and heavyweight concept
|
|
|