Grokking Concurrency in Python
Vote

0% completed

​

New Data Races

The free-threaded build keeps a short list of promises about shared data. A single append to a list, a single assignment to a dictionary key, and a single add to a set each finish as one whole step, as they did under the GIL. The build does not promise that two such operations in a row happen together, that += on a shared counter keeps every update, or that several threads can safely share one iterator.

Much code relied on those missing promises and worked under the GIL because the unsafe moment came rarely. Without the GIL, some of it loses most of its updates.

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content