Member-only story
Python is Removing GIL, Gradually
It’s time to try no-GIL Python in your local environment
Python’s Global Interpreter Lock (GIL) is a classic case of “love-hate”.
While it simplified the language design, enabling rapid growth and stability, it’s also become a bottleneck for multi-threaded programs seeking to leverage multi-core CPUs.
It is the major reason why software engineers, especially from other programming languages, would say: “Python is slow!”
Fortunately, a breaking-through change happened in the Python community. As per PEP 703 proposed, Python will remove GIL step by step in a few years.
This article will take you on a quick tour of the past, current, and future of the infamous GIL. More importantly, there is a beginner-friendly guide about how to install and try no-GIL Python in your local environment.
Quick Look: What is the GIL?
Before setting up your no-GIL Python, let’s have a quick look at this infamous GIL first. What on earth is it?
In short, the GIL is a mutex that ensures only one thread executes Python byte code at a time.
Introduced in the early 90s, it provided thread safety and simplicity. At the time, single-core CPUs were standard…