Message280711
`daemon` flag cannot be changed after thread is started, the documentation is right and the code of the daemon setter is actually:
if self._started.is_set():
raise RuntimeError("cannot set daemon status of active thread")
But still it looks like a code review problem: all your daemonic threads should be created as daemonic.
Breaking the `daemon` semantics looks like a bug magnet: any future uses of non-daemonic threads (by an "experienced" developer of your team, specifically needing a non-daemon thread for a specific task) will behave as a deamon thread and the specific task may not be correctly executed (like, logging an exception?). |
|
Date |
User |
Action |
Args |
2016-11-13 20:17:52 | mdk | set | recipients:
+ mdk, amaury.forgeotdarc, pitrou, eric.araujo, flox, michaelahughes |
2016-11-13 20:17:52 | mdk | set | messageid: <1479068272.81.0.819653227047.issue10444@psf.upfronthosting.co.za> |
2016-11-13 20:17:52 | mdk | link | issue10444 messages |
2016-11-13 20:17:52 | mdk | create | |
|