On Jan 6, 1:18 pm, s...@pobox.com wrote:
> Roger> .setDaemon(True) means the thread gets destroyed when the program
> Roger> exits and default .setDaemon(False) means that the thread
> Roger> continues to process even when the main program is gone?
>
> Approximately. The main thread (a
Roger> .setDaemon(True) means the thread gets destroyed when the program
Roger> exits and default .setDaemon(False) means that the thread
Roger> continues to process even when the main program is gone?
Approximately. The main thread (and thus the program) will exit only when
all non-
On Jan 6, 7:46 am, Duncan Booth wrote:
> "Alexi Zuo" wrote:
> > Hi everyone,
>
> > Here I have a simple program which starts a thread and the thread use
> > Popen to execute a shell cmd which needs a long time. I want to stop
> > the thread once I type "ctrl+C" (KeyboardInterrupt). But in fact t
"Alexi Zuo" wrote:
> Hi everyone,
>
> Here I have a simple program which starts a thread and the thread use
> Popen to execute a shell cmd which needs a long time. I want to stop
> the thread once I type "ctrl+C" (KeyboardInterrupt). But in fact this
> program enters a dead loop. Can anyone tel