[Python-Dev] Fun with 2.3 shutdown

Armin Rigo arigo at tunes.org
Fri Sep 19 08:01:00 EDT 2003


Hello Tim,

The behavior of Python regarding whether threads should continue to run after
the main one exited has never been too clear. Wouldn't it make sense to try to
control this aspect more precisely ? I have also experienced this kind of
shutdown glitches.

It definitely needs more thinking, but what about this one: Python would only
shutdown after all threads are finished; but exiting the main thread would by
default send a SystemExit exception to all current threads, if that can be
done cleanly (oh well, this problem again).

Another question, what was the rationale for setting module globals to None
instead of simply deleting them (and getting the expected AttributeErrors both
at C and at Python level) ?


Armin




More information about the Python-Dev mailing list