python - multithreading windows apache server -
i'm working apache 2.2, had tried run 2 threads (parallel) seeming it's not working 2 threads running sequentially.
how can force running simultaneously (parallel) ??
test.wsgi::
import time def application(environ, start_response): status = '200 ok' output = str(time.time()) time.sleep(5) output += '<br/>' + str(time.time()) response_headers = [('content-type', 'text/html; charset=utf-8'), ('content-length', str(len(output)))] start_response(status, response_headers) return [output]
i had inserted @ the end of httpd.conf following:
include conf/extra/httpd-mpm.conf <ifmodule mpm_winnt_module> threadsperchild 253 maxrequestsperchild 0 </ifmodule> <virtualhost *> servername localhost wsgiscriptalias / c:\test\test.wsgi <directory c:\test> order deny,allow allow </directory> </virtualhost>
i'm getting thats works not parallely,
the 1st thread: 1374420108.56 1374420113.56
the 2nd thread: 1374420113.57 1374420118.57
thanks
the problem solved, it's seeming "test misuse", had test multiple tabs same browser, somehow browser doesn't handle these multiple concurrent requests, tried different browsers , it's working !!
Comments
Post a Comment