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

Sign in to watch this lesson
Performance of Concurrent Code · 3:57
What happens when a piece of parallel work throws, and how to stop the other threads once the answer is known. Following C++ Concurrency in Action, we mark the throw points in the naive parallel accumulate, watch both fatal cases abort a program on an Apple M3, then fix them with packaged_task futures, a join_threads guard and std::async. Finally we build the book's parallel find with an atomic done flag and a promise, and measure early exit against the naive and serial versions.