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

Answer by Manish Malhotra for What is a daemon thread in Java?

$
0
0

Daemon threads are as everybody explained, will not constrain JVM to exit, so basically its a happy thread for Application from exit point of view.

Want to add that daemon threads can be used when say I'm providing an API like pushing data to a 3rd party server / or JMS, I might need to aggregate data at the client JVM level and then send to JMS in a separate thread. I can make this thread as daemon thread, if this is not a mandatory data to be pushed to server.This kind of data is like log push / aggregation.

Regards,Manish


Viewing all articles
Browse latest Browse all 28

Trending Articles