examerioLogin

What is the GIL (Global Interpreter Lock)?

📘 Explanation

The GIL ensures only one thread executes Python bytecode at a time in CPython, which is why CPU-bound tasks need multiprocessing to truly run in parallel. The other answers incorrectly tie it to module imports, multi-core distribution, or process memory isolation, which are different concepts.

Related questions

← PreviousNo login needed