Author Jelle Zijlstra
Recipients Jelle Zijlstra, osantana
Date 2017-05-23.15:47:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1495554473.11.0.396254731309.issue30441@psf.upfronthosting.co.za>
In-reply-to
Content
Even with the patch, I don't think it's safe to modify os.environ while it's being accessed concurrently in another thread. The other thread's modification could arrive while the dict() call in your patch is running (in CPython the GIL might protect you, but that's an implementation detail).

I think the real solution is that your application uses a lock or some other concurrency mechanism to protect access to os.environ.
History
Date User Action Args
2017-05-23 15:47:53Jelle Zijlstrasetrecipients: + Jelle Zijlstra, osantana
2017-05-23 15:47:53Jelle Zijlstrasetmessageid: <1495554473.11.0.396254731309.issue30441@psf.upfronthosting.co.za>
2017-05-23 15:47:53Jelle Zijlstralinkissue30441 messages
2017-05-23 15:47:53Jelle Zijlstracreate