[google-appengine] Re: os.environ and threadsafe: true

2012-08-28 Thread Kyle Finley
According to Nick Johnson (a former App Engine team member) os.environ is threadsafe: But what if my app makes use of 'os.environ' or other CGI-isms, you ask? All is not lost. The smart folks on the Python 2.7 runtime team foresaw that some apps will inevitably do this, and built in a workaroun

[google-appengine] Re: os.environ and threadsafe: true

2012-08-28 Thread Anand Mistry
In the python27 runtime, os.environ is thread safe since it is implemented as request/thread-local. However, this means that changes in one request will not be visible by other requests. Also, since os.environ is conceptually a global dictionary, I would recommend against writing to it whenever

[google-appengine] Re: os.environ and threadsafe: true

2012-09-19 Thread Andrew Mackenzie
NOTE that if you have an instance (and hence a VM) running, then it has a thread that serves incoming requests sequentially as needed. A new thread is not started for each request, it can be one thread serving requests in a loop. So. making changes to Thread Local variables (and hence envir