Message225269
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. |
|
Date |
User |
Action |
Args |
2014-08-13 08:29:32 | Ari.Koivula | set | recipients:
+ Ari.Koivula, docs@python, BreamoreBoy, paul.j3 |
2014-08-13 08:29:32 | Ari.Koivula | set | messageid: <1407918572.51.0.541879820345.issue12954@psf.upfronthosting.co.za> |
2014-08-13 08:29:32 | Ari.Koivula | link | issue12954 messages |
2014-08-13 08:29:31 | Ari.Koivula | create | |
|