[issue4684] sys.exit() exits program when non-daemonic threads are still running

R. David Murray report at bugs.python.org
Thu Aug 27 02:59:15 CEST 2009


R. David Murray <rdmurray at bitdance.com> added the comment:

Attached is a version of your program that calls sys.exit from a thread
other than the main one.  That sys.exit does not cause python to shut
down.  Exiting the main program by "falling off the end" does not result
in Python shutdown (pass an arbitrary argument to the example program to
see this). 

So what we have here, I believe, is a documentation problem, and I've
updated the issue to reflect that.  Please note in particular the last
two caveats in the 'thread' docs; I don't consider these adequate
documentation, but they do seem to be relevant to the issue at hand.

Does this make sense to you?

Note that issue 6634 should also be addressed in any update to the
relevant areas of the documentation.

----------
assignee:  -> georg.brandl
components: +Documentation -None
nosy: +georg.brandl, r.david.murray
priority:  -> normal
stage:  -> needs patch
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5, Python 3.0
Added file: http://bugs.python.org/file14786/threading_exit_example.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4684>
_______________________________________


More information about the Python-bugs-list mailing list