On this page
article
Interview Q&A #42
Data Structures interview question #2.
Category: Data Structures
Question
[Data Structures] Question #2: Explain Python’s GIL.?
Answer
The Global Interpreter Lock allows one thread to execute Python bytecode at a time. Use multiprocessing for CPU-bound parallelism.
Expand your answer with examples from your projects and link to Interview Prep.
Follow-Up Questions
- Can you explain a trade-off involved?
- How would you test this in production?
- What could go wrong at scale?