This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Ari.Koivula
Recipients Ari.Koivula, BreamoreBoy, docs@python, paul.j3
Date 2014-08-13.08:29:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1407918572.51.0.541879820345.issue12954@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-08-13 08:29:32Ari.Koivulasetrecipients: + Ari.Koivula, docs@python, BreamoreBoy, paul.j3
2014-08-13 08:29:32Ari.Koivulasetmessageid: <1407918572.51.0.541879820345.issue12954@psf.upfronthosting.co.za>
2014-08-13 08:29:32Ari.Koivulalinkissue12954 messages
2014-08-13 08:29:31Ari.Koivulacreate