MediumExperience level: 3-5 years · 8-15 years1 min read

Why use an ExecutorService instead of new Thread(), and which pool type do you pick?

Reviewed by Gurusankar M.

Asked inAmazonMicrosoftCognizantWipro
#executorservice#thread pool#executors#newfixedthreadpool
Report issue

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

  1. How do you size a pool for I/O-bound vs CPU-bound work?
  2. What queue + rejection policy do you choose?
  3. 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.
Open inChatGPTGeminiClaude

Was this answer helpful?

Affiliate links

Equipment for a comfortable, productive setup.

As an Amazon Associate I earn from qualifying purchases.