Abstract:
Although Python provides all the synchronization primitives and communication mechanisms one can need for fine-grained management of concurrency, due to the design of the CPython interpreter it is impossible to execute the code on multiple CPUs at a time. This is caused by Global Interpreter Lock (GIL), the mechanism that guaranties that only one thread can execute Python byte code at a time. The article describes the origin of this problem and provides a solution that can significantly improve performance by using C/C++ code extensions, thus benefiting from the speed of compiled languages.