Sys.exit in secondary threads
Pakal
chambon.pascal at gmail.com
Fri Oct 8 15:13:28 EDT 2010
I've noticed that there is nothing in python's documentation regarding
the use of sys.exit(code) in a non-main thread.
As far as I've seen, the behaviour in this case is to simply exit the
thread, without caring about the return code. in the main thread
however, the return code becomes the official return code of the whole
process.
Is that all we have to say about sys.exit() in a multithreaded
program ? Or are there corner cases I've missed ? We'd better document
this anyway.
Regards,
Pascal
More information about the Python-list
mailing list