Global interpreter lock
A global interpreter lock (GIL) is a mechanism used in computer-language interpreters to synchronize the execution of threads so that only one native thread (per process) can execute basic operations (such as memory allocation and reference counting) at a time. As a general rule, an interpreter that uses GIL will see only one thread to execute at a time, even if it runs on a multi-core processor, although some implementations provide for CPU intensive code to release the GIL, allowing multiple threads to use multiple cores. Some popular interpreters that have a GIL are CPython and Ruby MRI.
Global interpreter lock - Wikipedia Jump to content From Wikipedia, the free encyclopedia Mechanism that ensures threads are not executed in parallel Schematic representation of how threads work under GIL. Green - thread holding GIL, red - blocked threads A global interpreter lock ( GIL ) is a mechanism used in computer-language interpreters to synchronize the execution of threads so that only one native thread (per process) can execute basic operations (such as memory allocation and reference counting ) at a time. [ 1 ] As a general rule, an interpreter that uses GIL will see only one thread
Explore this link on the map →related reading
- What Is the Python Global Interpreter Lock (GIL)? – Real Pythonrealpython.com
- PEP 703 – Making the Global Interpreter Lock Optional in CPython | peps.python.orgpeps.python.org
- Python behind the scenes #13: the GIL and its effects on Python multithreadingtenthousandmeters.com
- Running Python Parallel Applications with Sub Interpreterstonybaloney.github.io
- Multithreading (computer architecture) - Wikipediaen.wikipedia.org
- Multithreading and Multiprocessing in 10 Minutes | Towards Data Sciencetowardsdatascience.com
- Notes on structured concurrency, or: Go statement considered harmful - njs blogvorpus.org
- BrrrVizbrrrviz.com
- To Thread or Not to Thread: An In-Depth Look at Ruby’s Execution Models - Shopifyshopify.engineering
- Glossary — Python 3.14.6 documentationdocs.python.org
- Why Learn Python Concurrency – SuperFastPythonsuperfastpython.com
- Reading 14: Concurrencyweb.mit.edu