Tagged articles

ThreadPool

377 articles · Page 3 of 4
Selected Java Interview Questions
Selected Java Interview Questions
Mar 3, 2023 · Backend Development

Comprehensive Guide to Java CompletableFuture: Asynchronous Tasks, Callbacks, and Multi‑Future Composition

This article explains Java's CompletableFuture API introduced in JDK 8, covering how to create asynchronous tasks with supplyAsync and runAsync, use various callback methods such as thenApply, thenAccept, thenRun, whenComplete, handle, and combine multiple futures with thenCombine, allOf, anyOf, providing code examples and execution results.

CompletableFutureFutureCompositionThreadPool
0 likes · 16 min read
Comprehensive Guide to Java CompletableFuture: Asynchronous Tasks, Callbacks, and Multi‑Future Composition
Java Architect Essentials
Java Architect Essentials
Feb 10, 2023 · Backend Development

Using MDC for TraceId Propagation in Java Backend Applications

This article explains what MDC (Mapped Diagnostic Context) is, outlines its API, demonstrates how to configure logging and interceptors, and provides concrete solutions—including a custom thread‑pool wrapper and HTTP client interceptors—to ensure TraceId is correctly propagated across threads and remote calls in Java backend systems.

InterceptorMDCThreadPool
0 likes · 12 min read
Using MDC for TraceId Propagation in Java Backend Applications
Code Ape Tech Column
Code Ape Tech Column
Feb 2, 2023 · Backend Development

Handling Exceptions in Java ThreadPool: submit vs execute and Custom Solutions

This article explains why tasks submitted to a Java ThreadPool via submit do not print exceptions, how to retrieve them using Future.get(), and presents three practical solutions—including try‑catch, Thread.setDefaultUncaughtExceptionHandler, and overriding afterExecute—to reliably capture and process thread pool exceptions.

ExceptionHandlingThreadPoolconcurrency
0 likes · 14 min read
Handling Exceptions in Java ThreadPool: submit vs execute and Custom Solutions
Architect
Architect
Jan 29, 2023 · Backend Development

DynamicTp: A Dynamic ThreadPoolExecutor Extension for Real‑time Monitoring and Configuration

DynamicTp is a Java library that extends ThreadPoolExecutor to enable dynamic, configuration‑center‑driven adjustment of thread‑pool parameters, real‑time monitoring, alert notifications, and metric collection, providing a lightweight, zero‑intrusion solution for microservice architectures.

Dynamic ConfigurationMonitoringSpringBoot
0 likes · 9 min read
DynamicTp: A Dynamic ThreadPoolExecutor Extension for Real‑time Monitoring and Configuration
Su San Talks Tech
Su San Talks Tech
Jan 26, 2023 · Backend Development

How MemorySafeLBQ Prevents OOM in Java Thread Pools: A Deep Dive

This article examines the MemoryLimitedLBQ and MemorySafeLBQ implementations, explains how they use memory‑limiting techniques to avoid Out‑Of‑Memory errors in unbounded LinkedBlockingQueue‑based thread pools, compares their designs, and shows practical code snippets for integrating them into Java projects.

LinkedBlockingQueueMemoryManagementOOM
0 likes · 13 min read
How MemorySafeLBQ Prevents OOM in Java Thread Pools: A Deep Dive
Architecture Digest
Architecture Digest
Jan 15, 2023 · Backend Development

Debugging High CPU Usage in Nacos Config Client and Understanding Raft Network Partition

The article details a sudden CPU spike in a Java backend service using Nacos, walks through diagnosing the offending thread with top and jstack, analyzes Nacos client thread creation and scheduled gray‑config tasks, explains Raft network partition handling, and presents a fix that checks config health and avoids unnecessary thread creation.

CPUDebuggingNacos
0 likes · 8 min read
Debugging High CPU Usage in Nacos Config Client and Understanding Raft Network Partition
Su San Talks Tech
Su San Talks Tech
Dec 9, 2022 · Backend Development

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

This article introduces asynchronous programming concepts in Java, explaining the shift from synchronous to asynchronous execution, and demonstrates practical implementations using raw threads, ThreadPoolExecutor, Future, FutureTask, CompletableFuture, and Spring's @Async annotation, along with event handling and message queue integration for high‑throughput systems.

AsynchronousCompletableFutureSpring
0 likes · 16 min read
Master Asynchronous Java: Threads, Futures, CompletableFuture & Spring @Async
The Dominant Programmer
The Dominant Programmer
Nov 1, 2022 · Fundamentals

Master Java Multithreading and Custom Thread Pools in One Guide

This article explains why creating threads repeatedly wastes resources, introduces Java's ExecutorService thread pool, details its configuration parameters, demonstrates how to create and use fixed thread pools with Runnable and Callable tasks, shows proper shutdown, and highlights common pitfalls with Future.get.

FutureThreadPoolcallable
0 likes · 9 min read
Master Java Multithreading and Custom Thread Pools in One Guide
FunTester
FunTester
Oct 19, 2022 · Backend Development

Controlling Java Async QPS with Semaphore and ThreadPool

This article explains how to use Java's java.util.concurrent.Semaphore together with a fixed-size thread pool to enforce a precise QPS limit for asynchronous tasks, providing API details, implementation steps, and a complete test example.

QPSSemaphoreThreadPool
0 likes · 6 min read
Controlling Java Async QPS with Semaphore and ThreadPool
Cognitive Technology Team
Cognitive Technology Team
Oct 16, 2022 · Backend Development

Understanding ScheduledThreadPoolExecutor: Task Types, Configuration, and Common Pitfalls

This article explains the different delay and periodic task types supported by Java's ScheduledThreadPoolExecutor, details its constructor parameters and default settings, and highlights common pitfalls such as exception loss, inaccurate scheduling, and improper core pool size configuration.

Exception HandlingScheduledThreadPoolExecutorThreadPool
0 likes · 5 min read
Understanding ScheduledThreadPoolExecutor: Task Types, Configuration, and Common Pitfalls
Selected Java Interview Questions
Selected Java Interview Questions
Oct 11, 2022 · Backend Development

Handling Exceptions in Java Thread Pools: submit vs execute and Custom afterExecute

This article explains why tasks submitted to a Java thread pool via submit do not print exceptions, how to retrieve those exceptions using Future.get, and presents three practical solutions—including try‑catch, Thread.setDefaultUncaughtExceptionHandler, and overriding afterExecute—to reliably capture and process thread‑pool errors.

ExceptionHandlingThreadPoolexecutorservice
0 likes · 14 min read
Handling Exceptions in Java Thread Pools: submit vs execute and Custom afterExecute
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.

ThreadPoolbackendconcurrency
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.

DeadlockThreadPoolasync
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.

LockThreadPoolconcurrency
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.

ThreadLocalThreadPoolTransaction
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.

Asynchronous ProgrammingCompletableFutureSpring 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.

ExecutorCompletionServiceOOMThreadPool
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.

ThreadPoolThreadPoolExecutorconcurrency
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 InterceptorMDCThreadPool
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.

ExecutorCompletionServiceMemoryLeakOOM
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.

AsynchronousCompletableFutureSpring Cloud
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.

ThreadPoolthread
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.

ThreadLocalThreadPoolTransmittableThreadLocal
0 likes · 13 min read
Using Alibaba's TransmittableThreadLocal to Propagate ThreadLocal Variables in Thread Pools
Shepherd Advanced Notes
Shepherd Advanced Notes
May 30, 2022 · Backend Development

Mastering Asynchronous Orchestration with Java CompletableFuture

This article explains how Java 8's CompletableFuture enables low‑overhead asynchronous composition, walks through its core methods, shows practical code examples for parallel data fetching, error handling, and task combination, and reveals implementation details from the source code.

AsynchronousCompletableFutureJava8
0 likes · 17 min read
Mastering Asynchronous Orchestration with Java CompletableFuture
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.

ThreadLocalThreadPoolbackend
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.

CompletionServiceThreadPoolconcurrency
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.

AsynchronousCompletableFutureThreadPool
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.

SpringThreadPoolconcurrency
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.

SpringThreadPoolasync
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.

MemoryLeakThreadLocalThreadPool
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 InterceptorMDCThreadPool
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.

CountDownLatchCyclicBarrierThreadPool
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 InterceptorMDCThreadPool
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.

AsynchronousEventSpring
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.

InterceptorMDCThreadPool
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.

ThreadPoolasyncbackend
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.

InterviewMySQLRedis
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.

AsyncServletSpringBootThreadPool
0 likes · 11 min read
Resolving Image Upload Timeouts in a SpringBoot Service with Thread‑Pool Tuning and Asynchronous Servlet
Java Interview Crash Guide
Java Interview Crash Guide
Jan 15, 2022 · Backend Development

Resolving Spring Boot Timer Conflicts with Multithreaded Scheduling

This article explains why multiple Spring Boot timers can conflict due to single‑threaded execution, demonstrates the problem with example outputs, and shows how to configure a thread pool and use @Async annotations to run timers concurrently, preventing bottlenecks and avalanche effects.

Spring BootThreadPooljava
0 likes · 5 min read
Resolving Spring Boot Timer Conflicts with Multithreaded Scheduling
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.

SpringThreadPoolasync
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.

HTTP InterceptorMDCThreadPool
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.

GroovyPhaserThreadPool
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.

CollectionsJVMThreadPool
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.

AsyncRejectionPolicySpring Boot
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.

Asynchronous ProgrammingCompletableFutureJava concurrency
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.

OptimizationThreadPoolconcurrency
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.

SpringThreadPoolasync
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.

CASThreadLocalThreadPool
0 likes · 20 min read
Core Java Multithreading Interview Questions and Concepts
Java Architect Essentials
Java Architect Essentials
Aug 11, 2021 · Backend Development

Understanding Java ThreadPoolExecutor: Creation, Configuration, and Execution Logic

This article explains the concept, purpose, and internal workings of Java's ThreadPoolExecutor, covering thread lifecycle, pool creation parameters, common blocking queues, thread factories, rejection policies, and the execute() method with code examples to help developers efficiently manage concurrent tasks.

ThreadPoolThreadPoolExecutorbackend
0 likes · 6 min read
Understanding Java ThreadPoolExecutor: Creation, Configuration, and Execution Logic
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.

SpringThreadPoolasync
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.

JDK8ThreadPoolexecutorservice
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.

ArrayBlockingQueueLinkedBlockingQueueThreadPool
0 likes · 6 min read
Types of Blocking Queues Used in Java Thread Pools
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jul 16, 2021 · Backend Development

Mastering Java Scheduled Tasks: Timer vs ScheduledExecutorService

This article compares Java's Timer and ScheduledExecutorService for scheduling tasks, explains their internal workings, demonstrates common pitfalls, and provides multiple code examples showing how to schedule one‑off, fixed‑rate, and fixed‑delay tasks using both Runnable and Callable.

Scheduled TasksScheduledExecutorServiceThreadPool
0 likes · 8 min read
Mastering Java Scheduled Tasks: Timer vs ScheduledExecutorService
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.

AtomicIntegerCyclicBarrierThreadPool
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.

Thread ManagementThreadPoolconcurrency
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.

Java concurrencyThreadPoolThreadPoolExecutor
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.

ExecutorOOMThreadPool
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.

ThreadPoolbackendconcurrency
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 ThreadThread PriorityThreadPool
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.

HashMapThreadPoolVolatile
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.

JVMThreadPoolblockingqueue
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.

ThreadPoolbackend developmentconcurrency
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.

CompletableFutureForkJoinThreadPool
0 likes · 7 min read
Mastering Java Concurrency: When to Use ThreadPool, CompletableFuture, and Fork/Join