-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"?

laike9m
  • 18,344
  • 20
  • 107
  • 140
  • Duplicate look: http://stackoverflow.com/a/1412230/1107807 or http://stackoverflow.com/a/15086113/1107807 or http://stackoverflow.com/a/4330156/1107807 – Don Question Mar 16 '13 at 16:02

1 Answers1

0

A daemon thread is a process that gets killed when the parent process exits. If you fork a process without setting its daemon to True, then it will run even if the parent process gets killed/exits. That is why you use daemon.

If you could post an example of code that renders that error message we could be more specific...

whatyouhide
  • 15,897
  • 9
  • 57
  • 71