Julien added the comment:

`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?).

----------
nosy: +sizeof

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10444>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to