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

Sign in to watch this lesson
Performance of Concurrent Code · 4:23
How a thread pool replaces a thread per task with a fixed crew of workers, following C++ Concurrency in Action chapter 9. On an Apple M3 we measure the per-task cost of std::thread, std::async and a pool, deadlock a two-worker pool whose tasks wait on other tasks and fix it with run_pending_task(), then compare one shared FIFO queue with per-worker work-stealing deques: who ran what, how deep the helping nested, and a stack overflow.