Author tim.peters
Recipients davin, eryksun, neologix, pietvo, pitrou, sbt, tim.peters
Date 2016-07-14.02:35:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1468463758.16.0.51369711552.issue18966@psf.upfronthosting.co.za>
In-reply-to
Content
Devin, a primary point of `threading.py` is to provide a sane alternative to the cross-platform thread mess.  None of these reports are about making it easier for threads to go away "by magic" when the process ends.  It's the contrary:  they're asking for multiprocessing to respect threading.py's default behavior of making it the programmer's responsibility to shut down their threads cleanly.  "Shut down your threads, or we refuse to let the process end."

It doesn't matter that native OS threads may behave differently.  threading.py very deliberately makes _its_ thread abstraction "non-daemonic" by default, and advertises that behavior for all platforms.  So it's at best surprising that threading.Thread's default semantics get turned inside out when multiprocessing creates a process.  I still see no reason to believe that's "a feature".

As to docs, if it boils down to the difference between `sys.exit()` and `os._exit()`, then _those_ are the places to put details, and multiprocessing docs just need to point out when a created process will use one or the other.

As is, the docs don't contain the slightest clue anywhere that a threading.Thread may violate its own docs (with respect to process-exit behavior) when created by a process launched by multiprocessing (or also by a concurrent.futures.ProcessPoolExecutor?  I didn't check).
History
Date User Action Args
2016-07-14 02:35:58tim.peterssetrecipients: + tim.peters, pitrou, pietvo, neologix, sbt, eryksun, davin
2016-07-14 02:35:58tim.peterssetmessageid: <1468463758.16.0.51369711552.issue18966@psf.upfronthosting.co.za>
2016-07-14 02:35:58tim.peterslinkissue18966 messages
2016-07-14 02:35:57tim.peterscreate