Local class variables? (mod_python problem)

Piet van Oostrum piet at cs.uu.nl
Thu Feb 22 11:06:28 EST 2007


>>>>> Rory Campbell-Lange <rory at campbell-lange.net> (RC) wrote:

>RC> totalgia keeps incrementing when this code is used under mod_python.

And also when used outside of mod_python. It is because it is a class level
variable. In fact I think under certain circumstances in mod_python it will
not do that because different requests can run in different Apache
processes (on Linux, Unix, Mac OS X etc.). So it this desired behaviour or
not? Your post isn't clear about that. And if it isn't what is the desired
behaviour?

And you certainly should do something about the concurrent access. 
-- 
Piet van Oostrum <piet at cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: piet at vanoostrum.org



More information about the Python-list mailing list