Why use an ExecutorService instead of new Thread(), and which pool type do you pick?
Reviewed by Gurusankar M.
β‘ Short Answer
Pools reuse threads (creating threads is expensive), bound concurrency, and decouple task submission from execution. Pick fixed pools for CPU-bound work (size β cores), bounded pools for I/O β and avoid Executors.newCachedThreadPool / newFixedThreadPool defaults in prod due to unbounded queues/threads.
βCoffee Chat Question
Concept Made Simple
βWhy use an ExecutorService instead of new Thread(), and which pool type do you pick?β
π§ Mind Map Answer
Remember It Faster
π₯What If?
Think Beyond the Expected
Why do many teams ban Executors.newFixedThreadPool / newCachedThreadPool in production?
newFixedThreadPool uses an UNBOUNDED LinkedBlockingQueue (tasks pile up β OOM), and newCachedThreadPool can spawn unbounded threads under load. Teams build a ThreadPoolExecutor with an explicit bounded queue and rejection policy instead.
πReal World
Almost every service uses a configured ThreadPoolExecutor (or framework-managed pool) with bounded queues so a traffic spike degrades gracefully (rejections) instead of OOM-ing.
π―Interviewer's Expectation
Keywords they're listening for:
β οΈCommon Mistakes
- βUsing new Thread() per task
- βnewFixedThreadPool with unbounded queue in prod
- βNever calling shutdown()
β Best Practices
- βConfigure ThreadPoolExecutor with a bounded queue
- βSize pools to workload (CPU vs I/O)
- βshutdown()/awaitTermination on stop
πFollow-up Questions
- 1How do you size a pool for I/O-bound vs CPU-bound work?
- 2What queue + rejection policy do you choose?
- 3How do you shut a pool down cleanly?
π§©Related Technologies
Continue Learning with AI
Take this question deeper with your favourite AI assistant. Pick a depth, copy the prompt, or open it directly β AI is your learning companion, not a shortcut.
Plain-language foundations
I'm preparing for a software engineering interview and want to understand this from scratch, as a beginner. Topic: Threads & Pools (Multithreading) Interview question: "Why use an ExecutorService instead of new Thread(), and which pool type do you pick?" Please: 1. Explain the core idea in simple, plain language, using an everyday analogy. 2. Define any technical terms you use. 3. Walk through one small, concrete example. 4. Finish with a single sentence I can easily remember. Keep the tone friendly and assume I'm new to this topic.
Was this answer helpful?
β Featured Products
Support our platform by exploring our recommended products.
As an Amazon affiliate, purchases through these links may earn us a small commission β at no extra cost to you. It helps keep Full Stack Interview Guru free.