[Python-Dev] PEP 3148 ready for pronouncement

Brian Quinlan brian at sweetapp.com
Fri May 28 05:06:02 CEST 2010


On May 28, 2010, at 11:57 AM, Reid Kleckner wrote:

> On Thu, May 27, 2010 at 4:13 AM, Brian Quinlan <brian at sweetapp.com>  
> wrote:
>> Keep in mind that this library magic is consistent with the library  
>> magic
>> that the threading module does - unless the user sets Thread.daemon  
>> to True,
>> the interpreter does *not* exit until the thread does.
>
> Is there a compelling to make the threads daemon threads?  If not,
> perhaps they can just be normal threads, and you can rely on the
> threading module to wait for them to finish.

Did you read my explanation of the reasoning behind my approach?

Cheers,
Brian

> Unrelatedly, I feel like this behavior of waiting for the thread to
> terminate usually manifests as deadlocks when the main thread throws
> an uncaught exception.  The application then no longer responds
> properly to interrupts, since it's stuck waiting on a semaphore.  I
> guess it's better than the alternative of random crashes when daemon
> threads wake up during interpreter shutdown, though.
>
> Reid



More information about the Python-Dev mailing list