[Web-SIG] WSGI multi threading indications?
Phillip J. Eby
pje at telecommunity.com
Mon Jan 8 18:12:57 CET 2007
At 08:38 AM 1/8/2007 -0800, Foobar BazBaz wrote:
>I'm using wsgiref.simple_server running behind Apache.
>(Created using wsgiref.simple_server.make_server)
>
>I see:
> wsgi.multiprocess is False
> wsgi.multithread is True
> wsgi.run_once is False
>
>I'm surprised by the value of multithread, since it
>appears
>(and looking at the code seems to verify) that
>additional
>threads are never created; i.e. the server
>synchronously
>handles one request at a time.
>
>Am I missing something?
The simple_server never creates multiple threads, but it's potentially
multi-threadable. It probably shouldn't be saying multithread unless it
knows it is. The WSGIRequestHandler.handle() method is the culprit; it
should probably be checking self.server in some way and passing an
appropriate multithread flag to the newly created ServerHandler.
More information about the Web-SIG
mailing list