[Python-Dev] Re: Static types and subinterpreters running in parallel

2021-12-16 Thread Guido van Rossum
Eric has been looking into this. It's probably the only solution if we can't get immutable objects. But I would prefer the latter, if we can get the performance penalty low enough. On Thu, Dec 16, 2021 at 2:31 AM Victor Stinner wrote: > Hi, > > One option to solve the https://bugs.python.org/iss

[Python-Dev] Re: Static types and subinterpreters running in parallel

2021-12-16 Thread Eric Snow
On Thu, Dec 16, 2021 at 10:54 AM Guido van Rossum wrote: > > Eric has been looking into this. It's probably the only solution if we can't > get immutable objects. Yep. I've investigated the following approach (for the objects exposed in the public and limited C-API): * add a pointer field to P

[Python-Dev] Re: Static types and subinterpreters running in parallel

2021-12-17 Thread Petr Viktorin
On 16. 12. 21 20:24, Eric Snow wrote: On Thu, Dec 16, 2021 at 10:54 AM Guido van Rossum wrote: Eric has been looking into this. It's probably the only solution if we can't get immutable objects. Yep. I've investigated the following approach (for the objects exposed in the public and lim