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
Waiting and Signalling · 4:06
How one thread waits for another without wasting the machine: busy-waiting burns a core, sleep-polling wakes late, and a std::condition_variable sleeps until it is notified, all measured on an Apple M3. We take apart wait(lock, predicate) from Listing 4.1, reproduce OSTEP's broken join (a lost wakeup without a state variable, a TSan data race without the lock), and see why spurious wakeups make the predicate essential.