DEV Community

Global Interpreter Lock (GIL) in Python

Prashant Sharma on November 27, 2019

This post was initially shared on my blog. Any operation which is executed in the interpreter, GIL ensures that the interpreter is held by a singl...
Collapse
 
dmerejkowsky profile image
Dimitri Merejkowsky • Edited

The GIL is a problem if, and only if, you are doing CPU-intensive work in pure Python.

Yes, thank you! I grew a bit tired of people speaking of the GIL as if it prevented any kind of concurrent programming in Python, I'll link your article as a rebuttal :)

Collapse
 
sharmapacific profile image
Prashant Sharma

@Dimitri, Sure, put this link as a rebuttal and I am glad this post helps you.

Collapse
 
juancarlospaco profile image
Juan Carlos • Edited

You can use Nim nim-lang.org that has no GIL,
because it wont have interpreter, I use it for Python and Frontend.
Cython cython.org also has something to skip GIL.
Nowadays even the ARM has like +8 cores, so is an interesting information.

Collapse
 
sharmapacific profile image
Prashant Sharma

Thanks @juan , let's keep sharing knowledge.