i was reading some stuff on threadgroup and they are talking about setting a Daemon level thread? what is meant by Daemon level? are those system level threads?
Printable View
i was reading some stuff on threadgroup and they are talking about setting a Daemon level thread? what is meant by Daemon level? are those system level threads?
The runtime enviroment distinguishes between user threads and daemon threads. As long as the user thread is alive, the execution does not termanate. A daemon thread is acutually at the mercy of the runtime system, it is stoped if there are no more user threads running. When a standalone application is run a user thread is automatically created to execute the main() method. The thread is called the main thread. If no other thread are spawned the program termanates when the main() method finishes executing. You can change the threads status by using setDaemon(boolean), but note! this must be done before the thread is started. :)