First page Back Continue Last page Overview Graphics

The GIL

Global Interpreter Lock (GIL) is a mechanism used in computer language interpreters to synchronize the execution of threads so that only one thread can execute at a time. An interpreter which uses GIL will always allow exactly one thread to execute at a time, even if run on a multi-core processor. Some popular interpreters that have GIL are CPython and Ruby MRI.

Gil in Python means:

non I/O execution

I/O

non I/O execution

GIL acquired

GIL released

I/O