[issue13140] ThreadingMixIn.daemon_threads is not honored when parent is daemon

Charles-François Natali report at bugs.python.org
Sun Oct 23 13:28:55 CEST 2011


Charles-François Natali <neologix at free.fr> added the comment:

> I would prefer to preserve the inheritance by default, and to change the daemonic attribute only if it is explicitly set to True or False.
> This way it will be backward compatible.

It may be backward compatible, but IMHO, the current behavior is
broken: while it can certainly make sense to set the server thread
daemonic, you most certainly don't want to have client threads
daemonic implicitely (since you usually don't want to terminate the
client's connections abruptly when the main thread exits).
But I must admit I don't have a strong opinion, so both solutions are OK to me.
The only thing that bothers me is this:
"""
+.. versionchanged:: 3.3
+   previously, the *daemon_threads = False* flag was ignored.
"""

You usually document new features or behavior changes: this really
looks like a bug fix (and is one actually). Something like "the
semantics of *daemon_threads* changed slighty" might be better (but
I'm no native speaker).

----------

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


More information about the Python-bugs-list mailing list