Message168766
| Author |
ncoghlan |
| Recipients |
grahamd, ncoghlan, pitrou |
| Date |
2012年08月21日.13:21:28 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1345555290.19.0.391142883608.issue15751@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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). |
|
History
|
|---|
| 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 |
|