Repaso
EspaƱol
PythonAdvancedPY-40

What is the current state of the GIL in modern CPython (3.13+)?

Options

  1. It was removed entirely in every build of CPython 3.13 and later
  2. It is still the default; an optional free-threaded build (PEP 703) has none (Correct option)
  3. It was replaced by asyncio as the main concurrency model
  4. It only exists on Windows builds, not on Linux or on macOS

Answer

Still present in the default build; an optional free-threaded build (PEP 703) can run without it

Why

PEP 703 added an optional 'free-threaded' build of CPython (from 3.13) where the GIL is disabled, so threads can run Python code truly in parallel.

The normal Python most people install still has the GIL, and C libraries must be updated to work in the new mode.

Remember

The GIL is still the default; free-threading is an optional build.

Key terms

Practice this question in Repaso