Nick Coghlan added the comment:

My understanding of the mod_wsgi architecture is that it uses subinterpreters 
to maintain a persistent process, while still providing a relatively pristine 
interpreter state to handle each new request. This means even when you're using 
multiple processes with a single request handling thread per process, you're 
running a subinterpreter unless you explicitly configure mod_wsgi to always run 
in the main interpreter (which, I believe, will result in additional state 
persistence across requests).

The proposed API change can only fix scenarios where *at a given point in 
time*, *all* PyGILState_Ensure calls should be directed to a particular 
subinterpreter. The target subinterpreter may change *later*, but there still 
cannot be two desired targets within the same process at the same time.

However, at the moment, PyGILState doesn't even allow that - all externally 
created threads are handled in the *main* interpreter even if that isn't what 
the embedding application wants.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15751>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to