Propagating “daemon”-status to all child-threads in Java
问题 If I have a Thread object, I can call setDaemon(true) on it to mark that this thread should not prevent application shutdown if all other non-daemon threads have terminated. Is it possible to make this behavior automatically trickle down to all child-threads? I.e. if I have a thread that is marked as a daemon-thread, is there some way to enforce that all threads spawned by this thread are also automatically marked as daemon-threads? 回答1: Is it possible to make this behavior automatically