--- "Phillip J. Eby" <[EMAIL PROTECTED]> wrote: > 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. > >
Phillip, Yes... that's it exactly. Looking at the code, it appears that subclassing WSGIRequestHandler, overriding the handle method to dispatch to one of a pool of handler threads might be an easy way to get reasonalble performance from this still-simple approach. At least it *looks* to me like handle method would be the place to make the transfermation to thread-per-request. Comment? Thanks, Steve __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com