Price your future right. 60% off with code BLACKSCHOLES at USD checkout. Offer ends in 8d 09h 54m 32s8 days 9 hours 54 minutes 32 seconds.
Price your future right. 60% off with code BLACKSCHOLES at USD checkout. Offer ends in 8d 09h 54m 32s8 days 9 hours 54 minutes 32 seconds.

Sign in to watch this lesson
Concurrent Data Structures · 4:32
What happens to everyone else when one thread stops? Four worker processes share a counter and one is frozen with SIGSTOP mid-increment: behind a spinlock nobody else finishes a single increment for the whole second, while a compare-exchange loop keeps counting and recovers with one retry. From there we climb the ladder of guarantees (blocking, obstruction-free, lock-free, wait-free), measure a CAS loop whose unluckiest increment retried tens of thousands of times, and see why fetch_add is wait-free on this Mac.