[Web-SIG] WSGI multi threading indications?

Phillip J. Eby pje at telecommunity.com
Mon Jan 8 19:53:42 CET 2007


At 10:08 AM 1/8/2007 -0800, Robert Brewer wrote:
>You'll have to manually tell any WSGI server what environment it's running 
>in, because mod_proxy/mod_rewrite doesn't include that metadata by 
>default. There's probably a way to send a custom header from Apache up to 
>the WSGI server, but that would be by convention only (at this point).

Actually, the original poster's question is with respect to a standalone 
server program, so Apache would have no way to know what mode it (the 
standalone Python program) is running in!


>If you use mod_python (3.1 or better) instead of proxy/rewrite, you can 
>inspect apache.mpm_query(apache.AP_MPMQ_IS_THREADED) and 
>apache.mpm_query(apache.AP_MPMQ_IS_FORKED) as 
><http://projects.amor.org/misc/wiki/ModPythonGateway>http://projects.amor.org/misc/wiki/ModPythonGateway 
>does.

Not in the OP's case, since he's using a standalone program.  It doesn't 
matter what Apache's threading model is, he needs the threading model of 
*his* program.  :)



More information about the Web-SIG mailing list