Tech
The Python GIL, explained without the hand-waving
Every Python developer eventually hits this conversation:
"Just use threads to speed it up."
"Python threads don't run in parallel. The GIL."
"So threads are useless in Python?"
"No, they're great for—"
"You just said they don't run in parallel!"
Both people are half right. Here's the actual model, and the decision rules that follow from it.
What the GIL actually is
The Global Interpreter Lock is a mutex inside CPython that allows only one thread to execute Python ...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to