This PR introduces multi-threading support for different instances of PythonPlugin.
Previously, due to the global state used internally in the CPython library, two different plugins could not be used thread-safely.
This is achieved by using the Global Interpreter Lock (GIL) and (for Python 3.12 or newer) different sub-interpreters.
However, sub-interpreters are poorly documented and thus the implementation might not be perfect and still have some thread-unsafe calls.
This PR introduces multi-threading support for different instances of
PythonPlugin
. Previously, due to the global state used internally in the CPython library, two different plugins could not be used thread-safely.This is achieved by using the Global Interpreter Lock (GIL) and (for Python 3.12 or newer) different sub-interpreters.
However, sub-interpreters are poorly documented and thus the implementation might not be perfect and still have some thread-unsafe calls.
Resolves #6