Ari Koivula added the comment:

Guarding the initialization is indeed correct and works, but log_to_stderr 
adding the handler multiple times is still annoying. Especially as you probably 
do want it to be called for child processes (at least on windows) and it might 
be called during initialization in multiprocessing.forking.prepare (but not on 
windows).

There is no need to go through the handlers. Just avoid adding the handler 
again if it has already been added. There actually already is a variable 
(multiprocessing.util._log_to_stderr) that tracks this, but it isn't used.

----------

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

Reply via email to