[docs] [issue12954] Multiprocessing logging under Windows

Ari Koivula report at bugs.python.org
Wed Aug 13 10:29:32 CEST 2014

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 <report at bugs.python.org>

More information about the docs mailing list