The GIL ensures that when a C extension is manipulating Python objects, it has exclusive access to the Python interpreter state, preventing race conditions on Python data structures without additional locking within the C code itself.
Open the full topic