Daemon Threads Explanation
Some threads do background tasks, like sending keepalive packets, or performing periodic garbage collection, or whatever. These are only useful when the main program is running, and it’s okay to kill them off once the other, non-daemon, threads have exited. Without daemon threads, you’d have to keep track of them, and tell them to exit, … Read more