Grokking Concurrency in Python
Vote

0% completed

​

Making Races Happen on Demand

Two threads that call the same method do not run its steps in a fixed order, and the test cannot control which thread runs next. An interleaving is one particular order in which the steps of several threads run.

Harvest's URL frontier has a race that only some interleavings expose. Two threads both see that a URL is not yet in the visited set, and both then claim it, so the page gets fetched twice. A test cannot fail on this race unless one of those interleavings happens.

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content