-1

I've seen this many times,but still don't know the exact meaning.So anyone explains it? more specifically:

a. I know that if you set daemon=True the thread will become a daemon thread.But why do we need a daemon thread?

b. what's the meaning of "can exit"?

4

1 回答 1

0

守护线程是在父进程退出时被杀死的进程。如果你 fork 一个进程而不将其设置daemonTrue,那么即使父进程被杀死/退出,它也会运行。这就是你使用daemon.

如果您可以发布一个呈现该错误消息的代码示例,我们可以更具体......

于 2013-03-16T18:05:06.993 回答