[Python-Dev] Threading, atexit, and logging

"Martin v. Löwis" martin at v.loewis.de
Thu Dec 7 06:24:23 CET 2006


Tim Peters schrieb:
> Sorry, I couldn't follow the intent there.  Not obvious to me how
> moving this stuff from `threading` into `thread` would make it
> easier(?) for the implementation to wait for non-daemon threads to
> finish.

Currently, if you create a thread through the thread module
(rather than threading), it won't participate in the "wait until
all threads are done" algorithm - you have to use the threading
module. Moving it into the thread module would allow to cover all
threads.

Also, if the interpreter invokes, say, threading._shutdown():
that's also "user-screwable", as a user may put something else
into threading._shutdown. To make it non-visible, it has to be
in C, not Python (and even then it might be still visible to
extension modules).

Regards,
Martin


More information about the Python-Dev mailing list