[mod_python] How does mod_python handle concurrency?

Guy Davis davis at guydavis.ca
Thu Sep 4 16:12:39 EST 2003


We currently use time.strftime() in our CGI code after setting the TZ 
environment variable to the user's timezone.  Since I'm trying to move 
us away from the mod_python.cgi_handler to our own custom handler, in 
order to allow concurrent request handling, I was wondering how to get 
around the problem of having to update the TZ env var.

This dependency seems to be a problem for concurrent request 
processing.  Does anyone on this list have a trick for doing locale 
specific date formating while handling concurrent requests?

Also, does concurrent request processing in mod_python rely on a single 
Python process with multiple threads?  If so, are sys.exc_type and 
sys.exc_value shared between threads?  I'm on Apache 1.3 now but hope to 
move to Apache 2 soon.

Thanks,
Guy



More information about the Mod_python mailing list