Oct-13-2017, 01:14 AM
I have a somewhat esoteric question, but hopefully someone with knowledge of the Python internals (CPython in particular) can answer this.
I'm working in a very large codebase, developed by a very large company, in which many "apps" which are developed independently by teams in different groups and different brands of the company will all run inside a single process space and a single main thread. Only one app at a time, but the user can switch between them. There is an existing app which is embedding python 2.7, and my team also is developing an app which will embed some version of python 3.
I'm looking primarily at Windows here, but I may face the same issue in Unix.
What will happen if two different versions of python are embedded and initialized within the same process? Will they conflict? Will they use different GILs? Is the GIL or any other resource acquired by name, where the two libs will interfere with each other?
Ideally, and moving forward with the new code my team is developing, the initialization of python will be managed globally and each app will obtain a sub-interpreter. But I don't think I can modify the existing code which uses 2.7 and a single interpreter.
Thanks in advance, I greatly appreciate any thoughts (aside from restructuring the company)!
I'm working in a very large codebase, developed by a very large company, in which many "apps" which are developed independently by teams in different groups and different brands of the company will all run inside a single process space and a single main thread. Only one app at a time, but the user can switch between them. There is an existing app which is embedding python 2.7, and my team also is developing an app which will embed some version of python 3.
I'm looking primarily at Windows here, but I may face the same issue in Unix.
What will happen if two different versions of python are embedded and initialized within the same process? Will they conflict? Will they use different GILs? Is the GIL or any other resource acquired by name, where the two libs will interfere with each other?
Ideally, and moving forward with the new code my team is developing, the initialization of python will be managed globally and each app will obtain a sub-interpreter. But I don't think I can modify the existing code which uses 2.7 and a single interpreter.
Thanks in advance, I greatly appreciate any thoughts (aside from restructuring the company)!