DDatabricks·DSASDE-2Onsite – Concurrency / Multithreading
Thread Pool / Parallel Task Executor
Problem
Implement a fixed-size thread pool that executes submitted tasks, with graceful shutdown.
Example
submit N tasks to a pool of K workers; await completion
Constraints
- No deadlock; clean shutdown drains the queue
Approach
Worker threads pulling from a blocking queue; poison-pill or flag for shutdown. Reason about race conditions.
added 6 days ago