Description
Although Python 3.10 is still in testing version 3.10.0a5, would be great to incorporate it early into your system!
Mainly because of long-awaited new feature which can be enabled by #define EXPERIMENTAL_ISOLATED_SUBINTERPRETERS 1
. This feature allows to use fully isolated interpreters within one process. It means no more global GIL! Each interpreter now has local GIL. Hence now Python can be multi-core, thus boosting multi-threaded scripts many times (as many cores there are)!
Different interpreters are isolated and they can't (probably) share objects between each other except for passing serialized (pickled) form of objects between each other. Still each C/C++ thread can run a separate interpreter for parallel algorithms that need not too much of data interaction between threads. Basically this feature allows achieving same thing as with multiprocessing
module but within one process instead of many processes.
This feature was developed for several years and now it became alive. It needed to hand-modify around 1500 global static variables to make them thread-local scope.
Would be great to become first early alpha testers of this feature. I used Python C API in my C++ code a lot and thrilled of using now all the CPU cores within one process.
If you think that for some reason non-release version of Python 3.10 is not allowed for your system (although you can make some switch like --python experimental-cpython-3.10
) then you can leave this feature request (issue) open till 3.10 becomes a release, and probably it will become not far in the future. But if you decide to support it then don't forget to enable #define
mentioned above.