Coming from Java, I am confused about whether Python has real threads or not.
I have read about the Global Interpreter Lock (GIL) and understand that it is a lock per interpreter in Python, which is historical. However, I still see thread packages in Python. Why are they there if the GIL exists? What's the point?
So, what is the verdict here?
Thanks
7 comments · 90% upvoted · other discussions
Some stuff, particularly C code, can release the GIL while it is processing. This allows other threads to run. But it is the exception, so it can only be useful in very limited circumstances.