Quant Dev C++ Interview Question: Implement Threadpool
Nov 10, 2026
Preparing for a coding interview? Try our SWE interview prep course: https://bit.ly/4sNIC3y
Interviewed recently? Tell us about your experiences: https://www.aced.io/experiences
Zack walks through how to implement a thread pool in C++, a common quant developer coding interview question. He explains why creating a thread for every task is too slow, then builds a thread pool with a mutex, condition variable, and task deque. He also covers how to pick a sensible default thread count and a logging race condition that most candidates miss.
This coding interview features Zack Light: @zacklight
0:00 — Intro
1:15 — Why one thread per task is slow
3:20 — How a thread pool solves it
4:55 — 3 key ideas for interviews
5:50 — Member variables
6:55 — Why std::deque instead of std::queue
7:15 — Declaration order and destructors
8:35 — Choosing the number of threads
10:30 — Launching worker threads
11:20 — Stopping the pool and adding tasks safely
13:15 — The worker loop
14:40 — Example use case
15:20 — Logging: why output can interleave
18:30 — Fixing it with a proxy pattern
19:40 — Getting results with std::packaged_task
Related videos:
► Quant Dev C++ Interview Question: Implement Shared Pointer: https://www.youtube.com/watch?v=-Sf_lMpppQg
► Quant Developer Mock Interview (with Coding Jesus & Zack Light): https://www.youtube.com/watch?v=-sz35Q8oXrk
► FAANG Coding Interview: Longest Substring Without Repeating Characters: https://www.youtube.com/watch?v=IPjHWQTRXa0
📩 Subscribe to Aced: https://bit.ly/aced_yt
💼 Follow us on LinkedIn: https://bit.ly/aced_li
🎵 Follow us on TikTok: https://bit.ly/aced_tiktok
📸 Follow us on Instagram: https://bit.ly/aced_ig
ABOUT US
We are the fastest-growing tech interview prep platform. Our courses, coaching, and community are built by people from Google, Meta, Anthropic, OpenAI, and more.
Our courses cover product management, software engineering, system design, data science, and machine learning interviews — plus career coaching and a peer practice community.
#coding #softwareengineering #tech #cpp #quantdev
Show More Show Less 
