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

Sign in to watch this lesson
Waiting and Signalling · 4:09
Waiting for groups of threads, and asking threads to stop. A std::latch counts down once (ThreadSanitizer is clean with it and reports a race without it); the book's roller-coaster barrier shows why a reusable barrier needs a generation counter (a bool gate got stuck on a Mac); std::barrier adds a completion step and arrive_and_drop; and cooperative cancellation with a flag, the lost wakeup when the check and the sleep aren't under one mutex, and C++20 stop tokens.