I have used threading.local as a base class for years in heavy production
use with no problem. We use it for database connections, etc... mod_wsgi
will never try to send two requests to the same thread at the same time, so
it is quite safe.
Keep in mind that if you derive a class from threading.local, the __init__
method will be called once per thread. Just FYI.
Hope this helps.
On Fri, Apr 27, 2012 at 3:40 PM, Frederik Vogelsang <