Slide 3
Slide 3 text
Global Interpreter Lock (GIL)
●
A global lock held by the interpreter to avoid
sharing code that is not thread-safe with other
threads.
●
One GIL for each interpreter process.
●
Only the thread that has acquired the GIL may
operate on Python objects or call Python/C API
functions making the object model safe against
concurrent access.
●
Applications can use separate processes to achieve
full parallelism, as each process has its own
interpreter and in turn has its own GIL.