3 ms·
This is exactly what subinterpreters are for! Basically isolated copies of Python in the same process. https://docs.python.org/3/library/concurrent.interpreter
by hun3 6mo ago
This is exactly what subinterpreters are for! Basically isolated copies of Python in the same process.
https://docs.python.org/3/library/concurrent.interpreters.html https://docs.python.org/3/library/concurrent.interpreters.ht...
If you want a higher-level interface, there is InterpreterPoolExecutor:
https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.InterpreterPoolExecutor https://docs.python.org/3/library/concurrent.futures.html#co...