GIL (Global Interpreter Lock) એ CPython (પ્રમાણભૂત Python અમલીકરણ) માં એક mutex છે જે માત્ર એક થ્રેડને એક સમયે Python bytecode ચલાવવા દે છે. આનો અર્થ એ છે કે Python થ્રેડ્સ બહુવિધ CPU કોર પર Python કોડને સાચી સમવર્તીતામાં ચલાવી શકતા નથી — સમવર્તિતા માટે એક મહત્વપૂર્ણ વિચાર.
વ્યવહારમાં GIL નો અર્થ
Even with multiple threads on a multi-core CPU:
Only ONE thread runs Python bytecode at any instant.
→ Threading does NOT give CPU-bound parallelism in CPython.
