Quantcast
Channel: What is a daemon thread in Java? - Stack Overflow
Viewing all articles
Browse latest Browse all 28

Answer by user2663609 for What is a daemon thread in Java?

$
0
0

Daemon thread is like daemon process which is responsible for managing resources,a daemon thread is created by the Java VM to serve the user threads.example updating system for unix,unix is daemon process.child of daemon thread is always daemon thread,so by default daemon is false.you can check thread as daemon or user by using "isDaemon()" method.so daemon thread or daemon process are basically responsible for managing resources.for example when you starting jvm there is garbage collector running that is daemon thread whose priority is 1 that is lowest,which is managing memory.jvm is alive as long as user thread is alive,u can not kill daemon thread.jvm is responsible to kill daemon threads.


Viewing all articles
Browse latest Browse all 28

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>