Message168766
It would twiddle the autoInterpreterState and autoTLSkey entries in the pystate.c global variables to point to a different subinterpreter.
As I understand the situation, mod_wsgi doesn't need arbitrary externally created threads to be able to call back into arbitrary subinterpreters, it just needs to be able to direct externally created threads in a process to a subinterpreter other than the main one.
Graham, looking at the current impl - have you experimented with just calling _PyGILState_Init() with the interpreter state and current thread state for the desired subinterpreter to see what happens?
I think the new method could just be a cleaner combination of _PyGILState_ReInit and _PyGILState_Init. If I'm right, then calling _PyGILState_Init should convert the current crashes and deadlocks into a relatively less harmful memory leak (since the old entry in the TLS won't get deleted properly). |
|
Date |
User |
Action |
Args |
2012-08-21 13:21:30 | ncoghlan | set | recipients:
+ ncoghlan, pitrou, grahamd |
2012-08-21 13:21:30 | ncoghlan | set | messageid: <1345555290.19.0.391142883608.issue15751@psf.upfronthosting.co.za> |
2012-08-21 13:21:29 | ncoghlan | link | issue15751 messages |
2012-08-21 13:21:28 | ncoghlan | create | |
|