Use this as the source of truth for per-milestone work. Check items as they land.
- [P0] Define
BlockingQueue<T>public API ininclude/tp/blocking_queue.hpp. - [P0] Document close/pop wake rules and blocking behavior.
- [P0] Define
StopToken+StopSourcepublic API ininclude/tp/stop_token.hpp. - [P0] Define
ThreadPoolpublic API ininclude/tp/thread_pool.hpp. - [P1] Define future/promise surface for task submission (if needed).
- [P1] Add minimal examples showing submit + shutdown flow in
examples/.
- [P0] Implement core worker loop in
src/thread_pool.cpp. - [P0] Implement queue integration with
BlockingQueue. - [P0] Implement
ThreadPool::submitwith basic task wrapper. - [P0] Implement shutdown/close semantics (join, drain, cancel policy).
- [P1] Add a basic end-to-end example that executes multiple tasks.
- [P1] Add basic telemetry counters (submit/complete/reject/queue depth).
- [P2] Add parallel sum example using futures.
- [P0] Add per-worker deque structure and interface in
include/tp/. - [P0] Implement steal logic and fallback to central queue.
- [P1] Add simple contention metrics for queue/steal paths.
- [P1] Update benchmarks to compare M1 vs. M2 scheduling.
- [P0] Define task ownership model (ref-count or shared state).
- [P0] Implement task wrapper with safe completion/future linkage.
- [P1] Add cancellation/stop behavior for in-flight tasks.
- [P1] Add tests for lifecycle edge cases (shutdown + pending tasks).
- [P0] Choose a test framework and wire it into CMake.
- [P0] Implement unit tests for queue, stop token, thread pool.
- [P1] Implement stress tests for enqueue/drain/shutdown.
- [P1] Fill in latency and throughput benchmarks with stable configs.
- [P1] Add assert-based sanity tests for queue and thread pool basics.
- [P2] Add sanitizer build/run helper script.
- [P2] Run benchmarks and record sample results.
- [P0] Update
README.mdwith usage examples and guarantees. - [P1] Add design notes in
docs/if needed. - [P1] Add study guide and interview Q&A.
- [P1] Add a release checklist (targets, compilers, platforms).