jvandal / modwsgi

Automatically exported from code.google.com/p/modwsgi
0 stars 0 forks source link

Thread local data not preserved beyond lifetime of request. #120

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When any sub interpreter other than first, ie., anything other than %{GLOBAL}, 
for 
WSGIApplicationGroup, any thread local data is not preserved beyond life of a 
specific request.

This is because mod_wsgi internally creates a new thread state object for each 
request and thread 
local data is stored in the thread state object. The code should cache the 
thread state object and 
reuse it between requests for the same thread.

Note that at the moment, that thread local data is thrown away at end of 
request, may mean that 
when switch to preserving it, may highlight problems in applications which do 
not clean data out 
themselves. For example, memory usage may increase over time.

Original issue reported on code.google.com by Graham.Dumpleton@gmail.com on 23 Dec 2008 at 3:57

GoogleCodeExporter commented 8 years ago
Changes made in revision 1213 of mod_wsgi subversion trunk for 3.0.

Original comment by Graham.Dumpleton@gmail.com on 4 Mar 2009 at 10:48

GoogleCodeExporter commented 8 years ago
Version 3.0 of mod_wsgi now released with this change.

Original comment by Graham.Dumpleton@gmail.com on 22 Nov 2009 at 3:00