Tagged articles
358 articles
Page 3 of 4
Su San Talks Tech
Su San Talks Tech
Sep 25, 2022 · Backend Development

Mastering Java Thread Pools: Architecture, Execution Flow, and Custom Tuning

This article explains the fundamentals of Java thread pools, covering their purpose, construction parameters, execution process, worker reuse, task retrieval with timeout, lifecycle states, shutdown methods, monitoring techniques, and practical guidelines for customizing thread pools in real-world projects.

BackendExecutorServiceJava
0 likes · 17 min read
Mastering Java Thread Pools: Architecture, Execution Flow, and Custom Tuning
Cognitive Technology Team
Cognitive Technology Team
Sep 18, 2022 · Backend Development

Avoiding Thread Hunger Locks When Submitting Dependent Tasks to a Bounded Thread Pool

The article explains how converting a serial RPC call layer to an asynchronous parallel model can cause thread pool exhaustion and hunger lock when tasks depend on each other, demonstrates the issue with Java code, and provides practical strategies such as using separate pools or CompletableFuture to avoid the problem.

AsyncExecutorServiceJava
0 likes · 6 min read
Avoiding Thread Hunger Locks When Submitting Dependent Tasks to a Bounded Thread Pool
Su San Talks Tech
Su San Talks Tech
Aug 19, 2022 · Fundamentals

Master Java Concurrency: 60+ Interview Q&A on Threads, Locks & Thread Pools

This comprehensive guide explores Java concurrency fundamentals, covering thread creation, lifecycle, synchronization mechanisms, lock implementations, thread-local storage, memory model, atomic classes, common concurrency utilities, and detailed explanations of thread pools, their configurations, states, and best practices, accompanied by over sixty interview-style questions and code examples.

JavaLockSynchronization
0 likes · 81 min read
Master Java Concurrency: 60+ Interview Q&A on Threads, Locks & Thread Pools
Su San Talks Tech
Su San Talks Tech
Aug 14, 2022 · Backend Development

9 Hidden Pitfalls When Converting Synchronous Code to Multithreaded Execution

Switching from single‑threaded synchronous calls to multithreaded asynchronous execution can boost performance, but it also introduces nine common problems—including missing return values, data loss, ordering issues, thread‑safety bugs, ThreadLocal anomalies, OOM, high CPU usage, transaction failures, and service crashes—that developers must understand and mitigate.

JavaThreadLocalThreadPool
0 likes · 19 min read
9 Hidden Pitfalls When Converting Synchronous Code to Multithreaded Execution
Selected Java Interview Questions
Selected Java Interview Questions
Aug 1, 2022 · Backend Development

Root Cause Analysis of a Backend Out‑Of‑Memory Incident and Proper Use of ExecutorCompletionService

The article analyzes a production outage caused by misuse of ExecutorCompletionService, explains why missing take/poll leads to memory leaks, demonstrates correct and incorrect Java code examples, compares ExecutorService with ExecutorCompletionService, and provides practical guidelines to avoid similar OOM problems in backend services.

ExecutorCompletionServiceOutOfMemoryThreadPool
0 likes · 11 min read
Root Cause Analysis of a Backend Out‑Of‑Memory Incident and Proper Use of ExecutorCompletionService
Su San Talks Tech
Su San Talks Tech
Jul 28, 2022 · Backend Development

Asynchronous Java Programming: Threads, Futures, CompletableFuture & Spring @Async

This article introduces asynchronous programming concepts in Java, explaining how multithreading, Future, FutureTask, CompletableFuture, and Spring's @Async annotation can transform synchronous workflows into high‑throughput, low‑latency solutions, with code examples and practical guidance for implementing each technique.

CompletableFutureJavaSpring Boot
0 likes · 17 min read
Asynchronous Java Programming: Threads, Futures, CompletableFuture & Spring @Async
Top Architect
Top Architect
Jul 22, 2022 · Backend Development

Understanding ExecutorCompletionService: Root Cause Analysis and Best Practices

This article analyzes a production outage caused by misuse of ExecutorCompletionService, explains the underlying Java concurrency mechanisms, compares it with ExecutorService, provides correct code examples, and offers practical guidelines to avoid memory leaks and improve backend reliability.

ExecutorCompletionServiceJavaOOM
0 likes · 12 min read
Understanding ExecutorCompletionService: Root Cause Analysis and Best Practices
Top Architect
Top Architect
Jul 18, 2022 · Backend Development

Understanding ThreadPoolExecutor Parameters and Working Mechanism in Java

This article explains the core concepts, configurable parameters, and execution workflow of Java's ThreadPoolExecutor, illustrating each setting with analogies, code examples, and step‑by‑step analysis to help developers design safe and efficient thread pools.

JavaThreadPoolThreadPoolExecutor
0 likes · 8 min read
Understanding ThreadPoolExecutor Parameters and Working Mechanism in Java
Programmer DD
Programmer DD
Jul 13, 2022 · Backend Development

Mastering MDC in Java: Solve TraceId Loss in Multithreaded and HTTP Calls

This article explains what MDC (Mapped Diagnostic Context) is, outlines its API and advantages, demonstrates common traceId loss problems in child threads and HTTP calls, and provides practical solutions including thread‑pool wrappers, MDC utilities, and interceptors for HttpClient, OkHttp, RestTemplate, and third‑party services, plus the required log pattern.

HTTP InterceptorJavaThreadPool
0 likes · 12 min read
Mastering MDC in Java: Solve TraceId Loss in Multithreaded and HTTP Calls
Cognitive Technology Team
Cognitive Technology Team
Jul 9, 2022 · Backend Development

Avoiding OOM When Using java.util.concurrent.ExecutorCompletionService

The article explains how submitting tasks to ExecutorCompletionService without retrieving their results causes the internal unbounded LinkedBlockingQueue to retain Future objects, leading to memory leaks and OutOfMemoryError, and demonstrates the correct usage patterns to prevent this issue.

ExecutorCompletionServiceJavaMemoryLeak
0 likes · 6 min read
Avoiding OOM When Using java.util.concurrent.ExecutorCompletionService
Cognitive Technology Team
Cognitive Technology Team
Jun 17, 2022 · Backend Development

Why CompletableFuture’s Asynchronous Methods Should Use an Explicitly Provided Thread Pool

The article explains that CompletableFuture offers paired asynchronous methods—one using the default ForkJoinPool and another accepting a custom executor—and argues that providing an explicit thread pool avoids shared‑pool contention, loss of tracing information, ThreadLocal leakage, and class‑loader issues in Java backend applications.

AsynchronousCompletableFutureJava
0 likes · 5 min read
Why CompletableFuture’s Asynchronous Methods Should Use an Explicitly Provided Thread Pool
Selected Java Interview Questions
Selected Java Interview Questions
Jun 4, 2022 · Backend Development

Understanding Java Thread Creation, Thread Pools, and Optimization Strategies

This article explains how Java threads are created via the Thread.start method, details the underlying native implementation using pthread_create, compares Thread, Runnable, and Callable approaches, discusses the performance costs of spawning many threads, and presents thread‑pool optimization techniques for CPU‑ and I/O‑bound tasks.

ThreadThreadPool
0 likes · 13 min read
Understanding Java Thread Creation, Thread Pools, and Optimization Strategies
Code Ape Tech Column
Code Ape Tech Column
Jun 2, 2022 · Backend Development

Using Alibaba's TransmittableThreadLocal to Propagate ThreadLocal Variables in Thread Pools

This article explains why InheritableThreadLocal fails in pooled threads, introduces Alibaba's TransmittableThreadLocal library, demonstrates how to wrap executors and rewrite code to correctly transmit ThreadLocal data across parent‑child threads in Java thread pools, and provides detailed implementation and usage examples.

JavaThreadLocalThreadPool
0 likes · 13 min read
Using Alibaba's TransmittableThreadLocal to Propagate ThreadLocal Variables in Thread Pools
Selected Java Interview Questions
Selected Java Interview Questions
May 26, 2022 · Backend Development

Implementing Asynchronous Processing in Spring Boot: ThreadPool, @Async, and Message Queue Approaches

The article explains how to handle multi‑table updates in a Spring Boot backend by replacing synchronous single‑threaded execution with three asynchronous strategies—using a ThreadPoolExecutor, Spring's @EnableAsync/@Async annotations, and a message‑queue decoupling—to improve response time and system stability.

Spring BootThreadPool
0 likes · 7 min read
Implementing Asynchronous Processing in Spring Boot: ThreadPool, @Async, and Message Queue Approaches
DaTaobao Tech
DaTaobao Tech
May 25, 2022 · Backend Development

Best Practices for Java Thread Pools and ThreadLocal in Backend Development

The article outlines Java thread‑pool fundamentals, explains ThreadPoolExecutor parameters and Tomcat’s custom pool behavior, and provides best‑practice guidelines for creating pools directly, configuring rejection policies, and safely using ThreadLocal—including static declarations, proper cleanup, and avoiding memory‑leak pitfalls—to build stable, high‑performance backend services.

BackendJavaThreadLocal
0 likes · 32 min read
Best Practices for Java Thread Pools and ThreadLocal in Backend Development
Selected Java Interview Questions
Selected Java Interview Questions
May 19, 2022 · Backend Development

How to Detect When a ThreadPoolExecutor Has Finished All Tasks in Java

This article compares several practical techniques—using isTerminated after shutdown, comparing task counts, employing CountDownLatch, maintaining a manual counter, and checking Future.isDone—to reliably determine when a Java ThreadPoolExecutor has completed all submitted jobs, complete with code examples and pros and cons for each method.

CountDownLatchFutureThreadPool
0 likes · 10 min read
How to Detect When a ThreadPoolExecutor Has Finished All Tasks in Java
Code Ape Tech Column
Code Ape Tech Column
May 19, 2022 · Backend Development

Understanding Java CompletionService: Implementation, Usage, and Performance Benefits

This article explains the purpose and implementation of Java's CompletionService, compares it with ExecutorService, shows how it retrieves task results in completion order, provides detailed source code analysis, and discusses typical use cases such as load‑balancing and fast‑result retrieval in concurrent applications.

CompletionServiceExecutorServiceJava
0 likes · 11 min read
Understanding Java CompletionService: Implementation, Usage, and Performance Benefits
Meituan Technology Team
Meituan Technology Team
May 12, 2022 · Backend Development

CompletableFuture: Principles, Usage, and Practical Implementation in Java

The article explains how Java 8’s CompletableFuture enables efficient asynchronous programming—illustrated by Meituan’s order service refactor—by replacing slow synchronous RPC calls with composable, lazy, back‑pressure‑aware futures, offering thread‑pool best practices, robust exception handling, utility helpers, and achieving up to a 45 % latency reduction and fewer servers.

AsynchronousCompletableFutureJava
0 likes · 29 min read
CompletableFuture: Principles, Usage, and Practical Implementation in Java
Su San Talks Tech
Su San Talks Tech
May 2, 2022 · Fundamentals

12 Real-World Java Concurrency Scenarios Every Developer Should Master

This article explores twelve practical multithreading use cases in Java, ranging from simple scheduled tasks and listeners to Excel imports, remote call aggregation, user context handling, MDC logging, high‑concurrency simulation, Kafka message processing, atomic counters, and delayed jobs, providing code examples and best‑practice tips for each scenario.

JavaParallelStreamThreadPool
0 likes · 25 min read
12 Real-World Java Concurrency Scenarios Every Developer Should Master
Selected Java Interview Questions
Selected Java Interview Questions
Apr 29, 2022 · Backend Development

Using Spring's @Async Annotation: Thread Pool Configuration and Custom Implementations

This article explains the purpose and usage rules of Spring's @Async annotation, compares built‑in executors, demonstrates how to enable @Async, and provides detailed examples of custom thread‑pool configurations, multiple pool management, and important source‑code analysis for robust asynchronous processing in Java backend applications.

AsyncThreadPoolspring
0 likes · 13 min read
Using Spring's @Async Annotation: Thread Pool Configuration and Custom Implementations
Cognitive Technology Team
Cognitive Technology Team
Apr 24, 2022 · Backend Development

Pitfalls of Using ThreadLocal for User Context in Java Applications

Using ThreadLocal to store user information in Java web applications can lead to hidden failures such as loss of context and memory leaks, especially when thread pools are involved, so developers should restrict its usage to controller threads and employ static analysis tools to detect improper usage.

JavaMemoryLeakThreadLocal
0 likes · 4 min read
Pitfalls of Using ThreadLocal for User Context in Java Applications
Cognitive Technology Team
Cognitive Technology Team
Apr 24, 2022 · Backend Development

Thread Pool Misconfiguration Cases and Best Practices for Resilience

The article presents two 2018 incidents where improper Java thread‑pool settings caused service degradation and unavailability, analyzes the root causes such as insufficient core size, unbounded queues, and missing rejection handlers, and offers practical recommendations for dynamic sizing, alerting, degradation strategies, isolation, and auto‑scaling to prevent similar faults.

FaultToleranceJavaConcurrencyOperations
0 likes · 3 min read
Thread Pool Misconfiguration Cases and Best Practices for Resilience
Sohu Tech Products
Sohu Tech Products
Apr 6, 2022 · Backend Development

Using MDC for TraceId Propagation in Java Applications

This article explains what MDC (Mapped Diagnostic Context) is, shows its API and advantages, demonstrates how to add interceptors and log patterns to include a traceId, and provides solutions for traceId loss in child threads and HTTP calls by wrapping thread pools and implementing HTTP client interceptors.

HTTP InterceptorJavaThreadPool
0 likes · 11 min read
Using MDC for TraceId Propagation in Java Applications
IT Services Circle
IT Services Circle
Apr 3, 2022 · Backend Development

Four Ways to Determine When a Java ThreadPool Has Completed All Tasks

This article explains four practical techniques—using isTerminated, comparing task counts, CountDownLatch, and CyclicBarrier—to reliably detect when a Java ThreadPoolExecutor has finished executing all submitted tasks, including code examples, advantages, disadvantages, and a summary of each method.

CountDownLatchCyclicBarrierJava
0 likes · 12 min read
Four Ways to Determine When a Java ThreadPool Has Completed All Tasks
Architecture Digest
Architecture Digest
Mar 19, 2022 · Backend Development

Using MDC for TraceId Propagation in Java Backend Applications

This article explains what MDC (Mapped Diagnostic Context) is, its API and advantages, demonstrates how to integrate it into Spring MVC interceptors and log patterns, and provides solutions for traceId loss in child threads and HTTP calls using custom thread‑pool wrappers and HTTP client interceptors.

HTTP InterceptorJavaThreadPool
0 likes · 11 min read
Using MDC for TraceId Propagation in Java Backend Applications
Cognitive Technology Team
Cognitive Technology Team
Mar 13, 2022 · Backend Development

Understanding Synchronous vs Asynchronous Event Execution in Spring's SimpleApplicationEventMulticaster

After upgrading a core component, a previously synchronous domain event in Spring became asynchronous, causing runtime errors; this article explains the underlying mechanism, shows the relevant source code of SimpleApplicationEventMulticaster, and clarifies how the presence or absence of a configured thread pool determines whether events are processed synchronously or asynchronously.

AsynchronousEventJava
0 likes · 3 min read
Understanding Synchronous vs Asynchronous Event Execution in Spring's SimpleApplicationEventMulticaster
Top Architect
Top Architect
Mar 7, 2022 · Backend Development

Using MDC for TraceId Propagation in Java Backend Applications

This article explains how to use Mapped Diagnostic Context (MDC) in Java logging frameworks to propagate traceId across threads and HTTP calls, covering API usage, advantages, common pitfalls, and practical solutions including interceptor implementation, thread‑pool wrappers, and client‑side interceptors for HttpClient, OkHttp, and RestTemplate.

InterceptorJavaThreadPool
0 likes · 12 min read
Using MDC for TraceId Propagation in Java Backend Applications
macrozheng
macrozheng
Mar 4, 2022 · Backend Development

Why Misusing Spring @Async Can Crash Your System – and How to Avoid It

This article reveals how creating a new thread pool for each @Async method in Spring can exhaust system resources, explains Spring Boot’s default executor behavior, shows code examples, and offers practical guidance to prevent thread‑pool related crashes in Java backend applications.

BackendThreadPoolasync
0 likes · 7 min read
Why Misusing Spring @Async Can Crash Your System – and How to Avoid It
IT Services Circle
IT Services Circle
Feb 2, 2022 · Backend Development

Backend Engineer Interview Experience and Technical Q&A at Huanju (YY)

This article shares a detailed account of a backend engineer's multi‑stage interview process at Huanju (formerly YY), covering personal background, common Java and system design questions, database and caching strategies, distributed lock handling, and reflections on preparation and outcomes.

BackendThreadPoolinterview
0 likes · 16 min read
Backend Engineer Interview Experience and Technical Q&A at Huanju (YY)
Zhuanzhuan Tech
Zhuanzhuan Tech
Jan 19, 2022 · Backend Development

Resolving Image Upload Timeouts in a SpringBoot Service with Thread‑Pool Tuning and Asynchronous Servlet

The article details how a SpringBoot image‑upload service suffered timeouts due to excessive Full GC and thread‑blockage, and explains the investigation, thread‑pool tuning, and the adoption of asynchronous Servlet (with Tomcat and Spring MVC implementations) to isolate long‑running URL‑download tasks while returning results synchronously.

AsyncServletJavaSpringBoot
0 likes · 11 min read
Resolving Image Upload Timeouts in a SpringBoot Service with Thread‑Pool Tuning and Asynchronous Servlet
Architect's Tech Stack
Architect's Tech Stack
Dec 21, 2021 · Backend Development

Using @Async Annotation in Spring: Application Scenarios, Built‑in Thread Pools, and Custom Thread‑Pool Configuration

This article explains the @Async annotation in Spring, how it enables asynchronous method execution, compares the built‑in executors, shows how to configure custom thread pools via AsyncConfigurer or AsyncConfigurerSupport, and provides code examples for void, Future and CompletableFuture based async methods.

AsyncJavaThreadPool
0 likes · 12 min read
Using @Async Annotation in Spring: Application Scenarios, Built‑in Thread Pools, and Custom Thread‑Pool Configuration
Selected Java Interview Questions
Selected Java Interview Questions
Dec 12, 2021 · Backend Development

MDC and TraceId Propagation in Java Backend Applications

This article explains what MDC is, the problems it faces such as traceId loss in child threads and HTTP calls, and provides concrete solutions including interceptor implementation, thread‑pool wrappers, and logging pattern adjustments to ensure reliable traceId propagation in Java backend services.

BackendHTTP InterceptorJava
0 likes · 12 min read
MDC and TraceId Propagation in Java Backend Applications
Alibaba Terminal Technology
Alibaba Terminal Technology
Nov 8, 2021 · Mobile Development

How Youku Reduced App Size and Crashes When Embedding Alipay Mini‑Program SDK

This article explains how Youku tackled the large package size, thread‑explosion, and memory overhead introduced by integrating the Alipay mini‑program framework, using remote .so loading, layered dependency management, a unified thread pool, and lazy initialization to improve performance and stability.

AndroidAppOptimizationLazyLoading
0 likes · 10 min read
How Youku Reduced App Size and Crashes When Embedding Alipay Mini‑Program SDK
FunTester
FunTester
Oct 19, 2021 · Backend Development

Mimicking Go’s ‘go’ Keyword in Java and Groovy with Thread Pools

This article explains how to achieve Go‑style asynchronous execution in Java and Groovy by leveraging closures, the java.util.function.Supplier interface, custom thread‑pool wrappers, and Phaser‑based synchronization, complete with practical code examples and a custom ThreadFactory implementation.

AsyncGroovyJava
0 likes · 7 min read
Mimicking Go’s ‘go’ Keyword in Java and Groovy with Thread Pools
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Oct 9, 2021 · Backend Development

Common Java Interview Questions and Answers

This article compiles a comprehensive list of frequently asked Java interview questions, covering topics such as JDK/JRE/JVM relationships, object creation methods, equality comparison, concurrency mechanisms, collections, thread pools, and I/O models, providing concise answers for quick reference.

CollectionsJVMJava
0 likes · 14 min read
Common Java Interview Questions and Answers
Programmer DD
Programmer DD
Sep 24, 2021 · Backend Development

What Happens When a Spring Boot ThreadPool Overflows? Learn Rejection Strategies

This article demonstrates how a Spring Boot thread pool behaves when its core size, max size, and queue capacity are exceeded by multiple asynchronous tasks, explains the resulting TaskRejectedException, and shows how to configure built‑in or custom rejection policies to handle such scenarios.

AsyncJavaRejectionPolicy
0 likes · 9 min read
What Happens When a Spring Boot ThreadPool Overflows? Learn Rejection Strategies
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Sep 1, 2021 · Backend Development

Boost Spring Boot Order Calls: Sync vs Async with ThreadPool & CompletableFuture

This article compares synchronous and various asynchronous approaches for invoking multiple third‑party services in a Spring Boot order‑creation workflow, demonstrating plain sequential calls, manual thread creation, thread‑pool execution, CompletionService handling, and CompletableFuture composition, and shows their performance impact through timing results.

CompletableFutureJava concurrencySpring Boot
0 likes · 8 min read
Boost Spring Boot Order Calls: Sync vs Async with ThreadPool & CompletableFuture
Java Interview Crash Guide
Java Interview Crash Guide
Aug 31, 2021 · Backend Development

Mastering Java Thread Pools: Benefits, Workflow, Creation, and Tuning

This article provides a comprehensive guide to Java thread pools, covering their advantages, internal workflow, creation parameters, task submission methods, lifecycle states, shutdown procedures, performance tuning, monitoring metrics, and common pitfalls for developers seeking efficient concurrency management.

JavaThreadPoolconcurrency
0 likes · 18 min read
Mastering Java Thread Pools: Benefits, Workflow, Creation, and Tuning
Top Architect
Top Architect
Aug 19, 2021 · Backend Development

Understanding Spring @Async and Custom Thread Pools

This article explains how Spring's @Async annotation enables asynchronous method execution, compares synchronous and asynchronous flows, reviews the built‑in executors, highlights the drawbacks of the default SimpleAsyncTaskExecutor, and demonstrates how to configure a custom thread pool using AsyncConfigurer or TaskExecutor beans.

AsyncJavaThreadPool
0 likes · 9 min read
Understanding Spring @Async and Custom Thread Pools
Wukong Talks Architecture
Wukong Talks Architecture
Aug 17, 2021 · Fundamentals

Core Java Multithreading Interview Questions and Concepts

This article compiles 16 classic Java multithreading interview questions covering high‑concurrency containers, CAS and ABA problems, volatile vs synchronized, the Java Memory Model, ThreadLocal drawbacks, AQS, thread‑pool architecture, queue types, sizing strategies, rejection policies, lifecycle management, and graceful shutdown techniques.

CASJMMJava
0 likes · 20 min read
Core Java Multithreading Interview Questions and Concepts
Code Ape Tech Column
Code Ape Tech Column
Aug 8, 2021 · Backend Development

Master Spring @Async: Custom Thread Pools and Real-World Usage

This guide explains how Spring's @Async annotation works, compares built-in executors, shows how to configure custom thread pools via AsyncConfigurer or AsyncConfigurerSupport, and demonstrates various async method signatures including void, Future and CompletableFuture with practical code examples.

AsyncBackendJava
0 likes · 9 min read
Master Spring @Async: Custom Thread Pools and Real-World Usage
Selected Java Interview Questions
Selected Java Interview Questions
Aug 1, 2021 · Backend Development

Ways to Create Thread Pools in JDK 1.8

This article introduces the various thread pool creation methods available in JDK 1.8—including fixed, cached, scheduled, single, single‑scheduled, and work‑stealing executors—explains their characteristics, provides sample Java code for each, and shows typical execution results.

ExecutorServiceJDK8Java
0 likes · 10 min read
Ways to Create Thread Pools in JDK 1.8
Wukong Talks Architecture
Wukong Talks Architecture
Aug 1, 2021 · Backend Development

Types of Blocking Queues Used in Java Thread Pools

This article explains the different blocking queue implementations—ArrayBlockingQueue, LinkedBlockingQueue, SynchronousQueue, and PriorityBlockingQueue—used by Java thread pools, describing their structures, behavior, fairness settings, and performance characteristics for concurrent task execution.

ArrayBlockingQueueBackendBlockingQueue
0 likes · 6 min read
Types of Blocking Queues Used in Java Thread Pools
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jul 10, 2021 · Backend Development

Concurrent Unit Testing of AssetService.update with Optimization Techniques

This article explains how to write a concurrent unit test for the AssetService.update method using thread pools, CountDownLatch, AtomicInteger, and then suggests optimizations such as replacing AtomicInteger with LongAdder and employing CyclicBarrier to increase contention, providing full code examples and detailed explanations.

AtomicIntegerCyclicBarrierJava
0 likes · 9 min read
Concurrent Unit Testing of AssetService.update with Optimization Techniques
JD Retail Technology
JD Retail Technology
Jun 24, 2021 · Backend Development

Understanding Java Thread Pools: Concepts, Advantages, and Implementation Details

This article explains the concept of thread pools, their performance benefits, the three native Java pool implementations, detailed internal mechanisms of ThreadPoolExecutor, task queue choices, rejection policies, and practical tuning advice for real‑world applications such as Tomcat and custom frameworks.

ExecutorServiceJavaThread Management
0 likes · 13 min read
Understanding Java Thread Pools: Concepts, Advantages, and Implementation Details
Alibaba Cloud Developer
Alibaba Cloud Developer
May 31, 2021 · Backend Development

Why corePoolSize=0 Behaves Differently in Java ThreadPoolExecutor and How to Optimize It

This article explains the nuances of ThreadPoolExecutor configuration in Java, covering the behavior of corePoolSize=0, core thread creation, termination policies, keepAliveTime effects, exception handling, shutdown strategies, Spring alternatives, and practical best‑practice recommendations for robust backend concurrency management.

ExecutorServiceJava concurrencyThreadPool
0 likes · 21 min read
Why corePoolSize=0 Behaves Differently in Java ThreadPoolExecutor and How to Optimize It
JavaEdge
JavaEdge
May 16, 2021 · Backend Development

Why Your Java ThreadPool May Crash with OOM and How to Prevent It

This article explains the purpose and design of Java thread pools, illustrates common pitfalls such as unbounded queues causing OutOfMemoryError, and provides practical guidelines for configuring bounded queues, naming threads, handling exceptions, choosing rejection policies, and using separate pools for compute‑intensive tasks.

ExecutorJavaOOM
0 likes · 12 min read
Why Your Java ThreadPool May Crash with OOM and How to Prevent It
Full-Stack Internet Architecture
Full-Stack Internet Architecture
May 7, 2021 · Backend Development

12 Essential Java Thread‑Pool Interview Questions and Answers

This article systematically explains why thread pools are needed, how to create them, the types of pools Executors can build, key parameters, underlying principles, rejection policies, blocking queues, core‑thread settings, pool states, thread reuse, the difference between submit() and execute(), and practical usage tips for Java developers.

BackendExecutorServiceJava
0 likes · 13 min read
12 Essential Java Thread‑Pool Interview Questions and Answers
Full-Stack Internet Architecture
Full-Stack Internet Architecture
May 6, 2021 · Backend Development

Understanding User Threads and Daemon Threads in Java

This article explains the differences between user threads and daemon (background) threads in Java, demonstrates how to identify, create, and configure them—including thread pools—and discusses important considerations, priority effects, and typical use cases such as garbage collection.

Daemon ThreadJavaThread Priority
0 likes · 13 min read
Understanding User Threads and Daemon Threads in Java
Su San Talks Tech
Su San Talks Tech
Apr 28, 2021 · Fundamentals

Master Java Concurrency: HashMap, ConcurrentHashMap, JMM, Thread Pools & More

Explore deep Java concurrency concepts, from HashMap internals and its JDK7/JDK8 differences to ConcurrentHashMap’s lock strategies, thread states, memory models, volatile, CAS, synchronized, thread pools, AQS, and common interview questions, providing comprehensive insights for mastering multithreaded programming.

HashMapJMMThreadPool
0 likes · 38 min read
Master Java Concurrency: HashMap, ConcurrentHashMap, JMM, Thread Pools & More
Top Architect
Top Architect
Apr 27, 2021 · Backend Development

Common Misunderstandings in Thread Pool Configuration and How to Avoid Them

This article explains the inner workings of Java thread pools, clarifies common misconceptions about core pool sizing, BlockingQueue behavior, concurrency calculation, and runtime factors such as GC, providing practical guidance and code examples for correctly configuring thread pools in backend systems.

BlockingQueueJVMJava
0 likes · 12 min read
Common Misunderstandings in Thread Pool Configuration and How to Avoid Them
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Apr 21, 2021 · Backend Development

Understanding Java Thread Pools: Core Concepts, Rejection Policies, and Sizing Guidelines

This article explains Java thread pool fundamentals—including core parameters, task submission behavior, rejection policies, queue selection, thread factory usage, keep-alive settings—and provides practical guidance on determining optimal thread counts for I/O‑bound and CPU‑bound workloads.

Backend DevelopmentJavaThreadPool
0 likes · 11 min read
Understanding Java Thread Pools: Core Concepts, Rejection Policies, and Sizing Guidelines
JavaEdge
JavaEdge
Apr 21, 2021 · Backend Development

Mastering Java Concurrency: When to Use ThreadPool, CompletableFuture, and Fork/Join

The article explains Java’s concurrency utilities—thread pools, Future, CompletableFuture, and CompletionService—and introduces the divide‑and‑conquer Fork/Join framework, detailing its task model, core classes, work‑stealing mechanism, and best practices for CPU‑bound versus I/O‑bound parallel streams.

CompletableFutureForkJoinJava
0 likes · 7 min read
Mastering Java Concurrency: When to Use ThreadPool, CompletableFuture, and Fork/Join
Selected Java Interview Questions
Selected Java Interview Questions
Apr 9, 2021 · Backend Development

Understanding Java Thread Pools: Concepts, Creation, Execution Flow, and Common Types

This article explains Java thread pool fundamentals, including the purpose and advantages of using a pool, the parameters of ThreadPoolExecutor, the task execution workflow, saturation policies, and detailed descriptions of common pool types such as SingleThreadExecutor, FixedThreadPool, CachedThreadPool, and ScheduledThreadPool, plus a typical interview question about unbounded queues.

BackendExecutorServiceJava
0 likes · 9 min read
Understanding Java Thread Pools: Concepts, Creation, Execution Flow, and Common Types
Intelligent Backend & Architecture
Intelligent Backend & Architecture
Apr 7, 2021 · Fundamentals

Unlocking Java Concurrency: Master Threads, Locks, and Thread Pools

This comprehensive guide explains why concurrency is essential for modern systems, introduces core metrics like response time and throughput, outlines the three pillars of thread safety, compares concurrency with parallelism, and provides practical solutions for deadlocks, thread creation, synchronization, and efficient thread‑pool usage in Java.

JavaSynchronizationThreadPool
0 likes · 87 min read
Unlocking Java Concurrency: Master Threads, Locks, and Thread Pools
Java Captain
Java Captain
Feb 20, 2021 · Backend Development

Systematic Overview of Java Concurrency and the J.U.C Framework

This article provides a comprehensive, systematic guide to Java concurrency, covering fundamental concepts, key keywords such as volatile, final, and synchronized, and an in‑depth exploration of the J.U.C framework including locks, atomic classes, concurrent collections, thread pools, and utility classes.

JUCJavaLocks
0 likes · 23 min read
Systematic Overview of Java Concurrency and the J.U.C Framework
Senior Brother's Insights
Senior Brother's Insights
Feb 1, 2021 · Backend Development

Mastering Java Thread Pools: When to Use Each Executor Type

This article explains the concept of thread pools, compares seven creation methods in Java, details their parameters, execution flow, and rejection policies, and provides practical code examples to help developers choose the most appropriate pool for reliable and efficient multithreaded programming.

ExecutorServiceJavaThreadPool
0 likes · 17 min read
Mastering Java Thread Pools: When to Use Each Executor Type
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jan 8, 2021 · Backend Development

Deep Dive into Java HashMap, ConcurrentHashMap, JMM, and Concurrency Fundamentals

This article provides a comprehensive overview of Java's HashMap and ConcurrentHashMap implementations, explains core concurrency concepts such as thread states, the differences between concurrency and parallelism, memory models, volatile semantics, singleton patterns, thread pools, ThreadLocal, CAS, and the AQS framework.

HashMapJMMJava
0 likes · 31 min read
Deep Dive into Java HashMap, ConcurrentHashMap, JMM, and Concurrency Fundamentals
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jan 4, 2021 · Backend Development

Understanding ThreadPoolExecutor keepAliveTime=0 in Java

This article clarifies that setting keepAliveTime to 0 in a Java ThreadPoolExecutor causes excess idle threads beyond corePoolSize to terminate immediately, correcting the common misconception that 0 means threads live forever, and demonstrates the behavior with a concise code example.

ExecutorServiceJavaThreadPool
0 likes · 4 min read
Understanding ThreadPoolExecutor keepAliveTime=0 in Java
macrozheng
macrozheng
Dec 24, 2020 · Backend Development

Mastering Java Thread Pools: When and How to Choose the Right One

This article explains the concept of thread pools, compares seven creation methods—including FixedThreadPool, CachedThreadPool, and ThreadPoolExecutor—covers their parameters, execution flow, and rejection policies, and offers guidance on selecting the most appropriate pool for Java applications.

ExecutorServiceJavaThreadPool
0 likes · 20 min read
Mastering Java Thread Pools: When and How to Choose the Right One
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
Programmer DD
Programmer DD
Dec 11, 2020 · Backend Development

Why Does Executors.newSingleThreadExecutor Shut Down Unexpectedly? Uncovering GC and Finalize Mysteries

This article investigates the intermittent RejectedExecutionException caused by Executors.newSingleThreadExecutor, explains how Java's garbage collector and finalize method can prematurely shut down thread pools, demonstrates the behavior with reproducible code, and shows how newer JDK versions have fixed the issue.

GarbageCollectionJavaThreadPool
0 likes · 11 min read
Why Does Executors.newSingleThreadExecutor Shut Down Unexpectedly? Uncovering GC and Finalize Mysteries
Architect's Tech Stack
Architect's Tech Stack
Nov 23, 2020 · Backend Development

Graceful Shutdown in Java: Using Shutdown Hooks and ThreadPool Management

This article explains the concept of graceful shutdown for Java services, demonstrates how to register shutdown hooks with Runtime.getRuntime().addShutdownHook, provides a complete code example using thread pools, shows the execution results, and discusses best practices for safely terminating applications.

Graceful ShutdownOperationsThreadPool
0 likes · 8 min read
Graceful Shutdown in Java: Using Shutdown Hooks and ThreadPool Management
JavaEdge
JavaEdge
Nov 10, 2020 · Backend Development

Why Repeated Custom ThreadPools Trigger Java OOM and How to Fix It

Creating a new ThreadPoolExecutor with 10 core threads, 50 maximum threads, and a 2‑second keep‑alive for each request prevents core threads from being reclaimed, quickly exhausting native thread resources and causing an OutOfMemoryError.

JavaOOMThreadPool
0 likes · 2 min read
Why Repeated Custom ThreadPools Trigger Java OOM and How to Fix It