I tried to modify os.environ with a new class:
class ThreadLocal(threading.local, os._Environ):
def __init__(self, environ):
threading.local.__init__(self)
os._Environ.__init__(self, environ)
def on_thread_start(arg):
os.environ = ThreadLocal(os.environ)
cherrypy.server.on_start_thread_list.append(on_thread_start)
That did not work. There is still only one os.eniron.
Another idea:
* create a global lock
* aquire when specific environ is needed and block all other request
* release when done
The release need to be done after the template has rendered. So how can
i wrap tg.expose to release the lock after all work done?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---