Question
Which statement about Global Interpreter Lock (GIL) is the strongest interview answer?
- In CPython, the GIL means only one thread executes Python bytecode at a time inside one interpreter process.
- Global Interpreter Lock (GIL) is mostly a naming style choice and has little effect on runtime behavior or design tradeoffs.
- Global Interpreter Lock (GIL) exists mainly to reduce the number of files in a Python project.
- Global Interpreter Lock (GIL) matters only for frontend scripting and not for backend or automation code.
Hint
Start with the core rule behind Global Interpreter Lock (GIL).
Answer and rationale
Correct answer: A. In CPython, the GIL means only one thread executes Python bytecode at a time inside one interpreter process.
In CPython, the GIL means only one thread executes Python bytecode at a time inside one interpreter process. This is the base concept interviewers commonly test first.
Track: Python