|
Jay Knight
jhknight at gmail.com
Mon Jul 24 19:11:31 EDT 2006
If you take the hello world example, and add a time.sleep(5) at the
beginning... like this:
-----
import time
from mod_python import apache
def handler(req):
time.sleep(5)
req.content_type = "text/plain"
req.write("Hello World!")
return apache.OK
-----
Then request that URL twice, it seems that the second one doesn't
start until the first one is completely finished, that is, I can't
make them run at the same time. (And therefore, if I started 20 at
about the same time, the last one would not complete until about 100
seconds later, etc) How would I go about making them run at the same
time?
I've got a pretty standard mod_python install on gentoo. The
.htaccess for this directory is
-----
AddHandler mod_python .py
PythonHandler mptest
PythonDebug On
-----
I know this must be possible. But I don't know if it is a
configuration issue (.htaccess) or something within the code itself
(manually forking stuff off to handle multiple connections? bleh).
Jay K
|