flâneur — a map of the web's best reading

Global interpreter lock

en.wikipedia.org · 1,006 words · saved by 1 readers

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