[Python-Dev] Safe to change a thread's interpreter?

Phillip J. Eby pje at telecommunity.com
Mon Aug 2 16:59:19 CEST 2004


At 09:34 AM 8/2/04 +0200, Martin v. Löwis wrote:
>Phillip J. Eby wrote:
>>Yes, I saw that as a documented limitation.  Are there undocumented 
>>limitations as well?
>
>Might be. However, there is one more documented the limitation: The PEP
>311 extensions only work for a single interpreter state, as the PEP
>explains.

Maybe I'm misinterpreting it, but the "Design and Implementation" section 
sounds like the only issue would be that any automatically-allocated thread 
state would point to the primary interpreter.

For my intended use, that's not actually a problem, since import operations 
would have to switch the interpreter to the "correct" one, anyway.



More information about the Python-Dev mailing list