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.
On this page
Concept Made Simple
Coffee Chat Question
“Why use an ExecutorService instead of new Thread(), and which pool type do you pick?”
Remember It Faster
Mind Map Answer
- fixed
- CPU-bound, size ≈ #cores
- cached
- unbounded threads — risky
- single
- serialize tasks
- Prefer
- explicit ThreadPoolExecutor
Think Beyond the Expected
What If?
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:
- thread reuse
- bounded concurrency
- fixed for CPU / pool sizing
- unbounded-queue OOM risk
- explicit ThreadPoolExecutor
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
- How do you size a pool for I/O-bound vs CPU-bound work?
- What queue + rejection policy do you choose?
- How do you shut a pool down cleanly?
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?
Affiliate links
Tools for Your Developer Workspace
Equipment for a comfortable, productive setup.
As an Amazon Associate I earn from qualifying purchases.
- MonitorView on Amazon : BenQ EW2790U 27-inch Monitor (opens in a new tab)
BenQ EW2790U 27-inch Monitor
- LaptopView on Amazon : Acer Aspire One Laptop (opens in a new tab)
Acer Aspire One Laptop
- Office ChairView on Amazon : Wakefit Gravita Ergonomic Office Chair (opens in a new tab)
Wakefit Gravita Ergonomic Office Chair