Tagged articles
11 articles
Page 1 of 1
Java Architect Handbook
Java Architect Handbook
Apr 29, 2026 · Backend Development

How Many Ways Can You Create a ThreadPool in Java? Interview Essentials

The article explains the four ways to create a thread pool in Java, why the Executors factory methods are unsafe for production, how to manually configure ThreadPoolExecutor with its seven parameters, and compares scheduled and ForkJoin pools while providing interview‑focused Q&A and practical configuration formulas.

ExecutorsForkJoinPoolJava
0 likes · 14 min read
How Many Ways Can You Create a ThreadPool in Java? Interview Essentials
Java Captain
Java Captain
Apr 27, 2025 · Backend Development

Understanding Java Executors Thread Pools: newCachedThreadPool, newScheduledThreadPool, newSingleThreadExecutor, newWorkStealingPool, and newFixedThreadPool

This article explains the five main thread‑pool types provided by Java's Executors class, detailing their constructors, underlying queue implementations, and default thread‑count behaviors, and notes why the default pools may not suit everyday development needs.

ExecutorServiceExecutorsJava
0 likes · 4 min read
Understanding Java Executors Thread Pools: newCachedThreadPool, newScheduledThreadPool, newSingleThreadExecutor, newWorkStealingPool, and newFixedThreadPool
JavaEdge
JavaEdge
Dec 21, 2020 · Backend Development

Thread Pools That Cause OOM: Pitfalls of FixedThreadPool & CachedThreadPool

The article explains how Java's Executors utility creates thread pools that can unintentionally exhaust memory, detailing why FixedThreadPool with an unbounded queue and CachedThreadPool with unlimited threads often lead to OutOfMemoryError, and provides code examples and analysis from Alibaba's Java Development Handbook.

ExecutorsJavaOutOfMemoryError
0 likes · 5 min read
Thread Pools That Cause OOM: Pitfalls of FixedThreadPool & CachedThreadPool
Architecture Digest
Architecture Digest
Oct 20, 2020 · Backend Development

Deep Dive into Java ThreadPoolExecutor: Creation, Task Execution, and Shutdown Mechanisms

This article provides an in‑depth analysis of Java's ThreadPoolExecutor, explaining how Executors' factory methods create pools, detailing the constructor parameters, internal state management, task submission via execute, worker thread lifecycle, and the differences between shutdown and shutdownNow, with code excerpts for clarity.

ExecutorsJavaShutdown
0 likes · 19 min read
Deep Dive into Java ThreadPoolExecutor: Creation, Task Execution, and Shutdown Mechanisms
Selected Java Interview Questions
Selected Java Interview Questions
Jun 26, 2020 · Backend Development

Why Executors Should Not Be Used to Create Thread Pools and How to Properly Configure ThreadPoolExecutor in Java

This article explains the definition of thread pools, why using Executors to create them is discouraged, details the ThreadPoolExecutor constructor and its parameters, compares different Executors factory methods, demonstrates OOM testing, and provides practical guidelines for defining safe thread‑pool parameters in Java.

ExecutorsJavaOOM
0 likes · 13 min read
Why Executors Should Not Be Used to Create Thread Pools and How to Properly Configure ThreadPoolExecutor in Java
21CTO
21CTO
May 18, 2020 · Backend Development

Why You Should Avoid Executors and Build ThreadPoolExecutor Manually in Java

This article explains the definition of thread pools, why using Executors to create them is discouraged, details the ThreadPoolExecutor constructor and its parameters, compares different Executors factory methods, demonstrates OOM risks with tests, and provides practical guidelines for configuring safe thread pools.

ExecutorsJavaOOM
0 likes · 10 min read
Why You Should Avoid Executors and Build ThreadPoolExecutor Manually in Java
Architecture Digest
Architecture Digest
Dec 1, 2019 · Backend Development

Why Executors Should Not Be Used to Create Thread Pools: Understanding ThreadPoolExecutor and OOM Risks

This article explains the definition of thread pools, the pitfalls of using Executors to create them, details the ThreadPoolExecutor constructor and parameters, illustrates execution logic, demonstrates OOM scenarios with code examples, and provides guidelines for safely configuring thread pools in Java.

BackendExecutorsJava
0 likes · 11 min read
Why Executors Should Not Be Used to Create Thread Pools: Understanding ThreadPoolExecutor and OOM Risks
Programmer DD
Programmer DD
Nov 28, 2019 · Backend Development

Why You Should Avoid Executors for Thread Pools and Use ThreadPoolExecutor Directly

This article explains the definition of Java thread pools, why creating them via Executors is discouraged, details the ThreadPoolExecutor constructor and parameters, compares different Executors factory methods, demonstrates OOM risks with tests, and offers guidelines for configuring thread pool size and rejection policies.

ExecutorsJavaOOM
0 likes · 12 min read
Why You Should Avoid Executors for Thread Pools and Use ThreadPoolExecutor Directly
Senior Brother's Insights
Senior Brother's Insights
Nov 26, 2019 · Backend Development

Why Executors Should Be Avoided for ThreadPool Creation in Java

This article explains the definition of thread pools, the pitfalls of using Executors factory methods, details the ThreadPoolExecutor constructor parameters, compares different Executors implementations, demonstrates OOM tests, and offers guidelines for configuring thread pool parameters and rejection policies.

ExecutorsJavaOOM
0 likes · 10 min read
Why Executors Should Be Avoided for ThreadPool Creation in Java
21CTO
21CTO
Oct 11, 2015 · Backend Development

Inside Java’s ThreadPoolExecutor: How Executors Actually Work

This article dissects Java’s Executors utility, revealing how Executors.newFixedThreadPool creates a ThreadPoolExecutor, detailing constructor parameters, task execution flow, thread creation, queue handling, rejection policies, and worker lifecycle, giving readers a clear understanding of the internal mechanics behind Java’s thread pools.

ExecutorsJUCJava
0 likes · 14 min read
Inside Java’s ThreadPoolExecutor: How Executors Actually Work
Qunar Tech Salon
Qunar Tech Salon
Jan 17, 2015 · Backend Development

Four Styles of Java Concurrency: Threads, Executors, ForkJoin, and Actors

This article compares four Java concurrency approaches—raw threads, the Executor framework, parallel streams backed by ForkJoinPool, and the Actor model—explaining their implementations, advantages, drawbacks, and typical pitfalls through concrete code examples and practical discussion.

ActorsExecutorsForkJoin
0 likes · 13 min read
Four Styles of Java Concurrency: Threads, Executors, ForkJoin, and Actors