LATEST CHATTY HEADER
Subscribe to Shacknews Mercury starting at $1/month!
Chrome Shack Community Guidelines Chatty Search
Scroll down to join the conversation.
New to Shacknews? Signup for a Free Account
Already have an account? Login Now
Subscribe to Shacknews Mercury starting at $1/month!
Chrome Shack Community Guidelines Chatty Search
Scroll down to join the conversation.
Thread Truncated. Click to see all 145 replies.
The problem is an implementation detail of the most common python distribution: CPython. It has this thing called the "gil" (I pronounce it like the gill of a fish, but I think jil would also be reasonable).
The GIL is the Global Interpreter Lock, a mutex that python grabs whenever the interpreter is executing python instructions. It grabs the GIL and holds it for a few hundred python instructions, then lets it go. It does this to ensure that no two threads are ever operating (at the C level) on the same object at the same time.
The problem, then, is that code in python that is written in multiple threads is typically only actually executing one thread at a time, because the other threads are blocked waiting to get at the GIL. There are efforts underway to remove or reduce the impact of the GIL.
The post has been reported. Thank you!
You must be logged in to post.
You must be logged in to post.