Tagged articles
FutureTask
16 articles · Page 1 of 1
The article explains how Java's thread pool silently consumes exceptions when using submit(), shows a minimal reproducible example, reveals where the exception is stored, and offers three practical ways to surface or handle those hidden errors.
ConcurrencyExceptionHandlingFutureTask
0 likes · 7 min read

This article explores four Java asynchronous programming approaches—Future with Callable, CompletableFuture, and FutureTask—detailing their principles, usage patterns, code examples, and how to retrieve results from thread pools, helping developers improve performance for tasks like aggregating order and fee summaries.
CompletableFutureFutureFutureTask
0 likes · 12 min read

This article compares three Java concurrency approaches—Future with Callable, CompletableFuture, and FutureTask—explaining their underlying principles, step‑by‑step usage, code examples, and trade‑offs so you can decide which asynchronous tool best fits your reporting workload.
CompletableFutureConcurrencyFuture
0 likes · 10 min read

This article explains how to improve backend performance by fetching independent report data concurrently using Java's Future, Callable, CompletableFuture, and FutureTask classes, provides code examples for each approach, and compares their principles, usage patterns, and cancellation capabilities.
CompletableFutureConcurrencyFuture
0 likes · 9 min read

This article explains how Java's ThreadPoolExecutor handles tasks submitted via execute() and submit(), why execute() prints exceptions directly while submit() defers them until Future.get() is called, and provides detailed source‑code analysis and examples to illustrate the underlying mechanisms.
FutureTaskJavaThreadPoolExecutor
0 likes · 14 min read

This article explains how to obtain return values from asynchronous Java methods using FutureTask, covering its AQS foundation, execution flow, get() behavior, and provides concrete source code examples for practical implementation.
AQSAsyncConcurrency
0 likes · 13 min read

This article explains how to create threads using Runnable or Thread, introduces the Callable and Future interfaces introduced in Java SE 5.0, compares them, shows how to use ExecutorService methods, and demonstrates retrieving results with FutureTask and example code.
ExecutorServiceFutureFutureTask
0 likes · 8 min read

FutureTask acts as a proxy for asynchronous tasks in Java, providing result retrieval with optional timeout, completion checks, cancellation, and repeat execution, while managing task state, outcomes, and exceptions; the article illustrates usage, internal fields, and common pitfalls such as missed exceptions and indefinite blocking.
ConcurrencyExceptionHandlingFutureTask
0 likes · 5 min read

This article explains how ThreadPoolExecutor's execute and submit methods differ in exception handling, why execute may terminate a worker thread while submit silently swallows exceptions, and provides code examples and recommendations for proper error handling in Java concurrency.
ConcurrencyExceptionHandlingExecutorService
0 likes · 6 min read

This article provides a comprehensive guide to Java's ThreadPoolExecutor, covering its lifecycle states, constructor arguments, work‑queue options, keep‑alive behavior, thread factories, rejection policies, common methods, and practical code examples for Callable, Runnable, Future and FutureTask.
ExecutorServiceFutureFutureTask
0 likes · 20 min read

This article explains how to use a thread pool together with FutureTask to split a large query into many small asynchronous tasks, improving response speed and handling exceptions correctly in Java concurrent programming.
ConcurrencyExecutorServiceFutureTask
0 likes · 6 min read

This article explains how to use Java's FutureTask, Callable, and ExecutorService to run multiple API calls concurrently, aggregate their results, and dramatically reduce total response time compared with sequential execution, complete with code examples and performance analysis.
ConcurrencyFutureTaskJava
0 likes · 23 min read

This article provides a detailed analysis of JDK 1.8’s FutureTask implementation, explaining its purpose, usage examples, internal structure, state transitions, key methods such as run, get, cancel, and the concurrency mechanisms like volatile fields, CAS operations, and thread‑waiting queues.
ConcurrencyFutureFutureTask
0 likes · 32 min read

This article provides a comprehensive overview of Java's java.util.concurrent package, detailing its core components such as atomic classes, locks, collections, executors, tools, as well as an in‑depth explanation of the AbstractQueuedSynchronizer (AQS) framework, its fields, methods, and related concurrency utilities like FutureTask, BlockingQueue, ForkJoin, and work‑stealing algorithms.
AQSConcurrencyForkJoin
0 likes · 22 min read

This article explains how to use JDK’s Future and FutureTask for asynchronous computation, walks through their APIs, internal state machine, core methods like run(), get(), cancel(), and highlights their limitations while introducing CompletableFuture as a more powerful alternative.
CompletableFutureFutureTaskJDK
0 likes · 25 min read

This article explains how to achieve thread communication and coordination in Java using Thread.join(), Object.wait()/notify(), CountDownLatch, CyclicBarrier, and the Callable/FutureTask pair, providing complete code examples and execution results for each technique.
CountDownLatchCyclicBarrierFutureTask
0 likes · 14 min read
