Tag

Thread

0 views collected around this technical thread.

IT Services Circle
IT Services Circle
May 22, 2025 · Fundamentals

Understanding Java Thread States and Using Arthas to Diagnose Thread Blocking

This article explains the six Java thread states defined in Thread.State, demonstrates how to use the Arthas diagnostic tool to identify blocked, waiting, or timed‑waiting threads, and provides practical strategies for diagnosing and optimizing thread‑blocking issues in Java applications.

ArthasJavaThread
0 likes · 7 min read
Understanding Java Thread States and Using Arthas to Diagnose Thread Blocking
Java Captain
Java Captain
May 21, 2025 · Fundamentals

Understanding Java Thread States and Their Transitions with Example Code

This article explains the six Java thread states defined in java.lang.Thread.State, describes the meaning of each state, illustrates the possible state transitions, and provides three runnable code examples that demonstrate NEW, RUNNABLE, BLOCKED, WAITING, TIMED_WAITING and TERMINATED states along with their console outputs.

ExampleJavaThread
0 likes · 11 min read
Understanding Java Thread States and Their Transitions with Example Code
Deepin Linux
Deepin Linux
May 6, 2025 · Fundamentals

Understanding Processes and Threads: Concepts, Differences, and When to Use Them

This article explains the fundamental concepts of processes and threads, their relationship, resource allocation, scheduling, communication methods, practical use cases, and interview preparation tips, helping readers choose between multiprocessing and multithreading for various scenarios.

Operating SystemThreadconcurrency
0 likes · 22 min read
Understanding Processes and Threads: Concepts, Differences, and When to Use Them
Deepin Linux
Deepin Linux
May 3, 2025 · Backend Development

Analyzing and Resolving Uninterruptible Thread States During System Suspend

This article examines why a thread may remain in an uninterruptible wake‑up state during system suspend, explains deadlock fundamentals, outlines thread lifecycle states, and provides practical debugging steps and mitigation strategies using Java concurrency tools and system monitoring.

JavaThreadconcurrency
0 likes · 23 min read
Analyzing and Resolving Uninterruptible Thread States During System Suspend
Cognitive Technology Team
Cognitive Technology Team
Mar 25, 2025 · Fundamentals

Understanding the Java Memory Model and Its Interaction with Hardware Memory Architecture

This article explains how the Java Memory Model defines the interaction between threads, thread stacks, and the heap, illustrates these concepts with diagrams and example code, and discusses how modern hardware memory architecture, caches, and CPU registers affect visibility and race conditions in concurrent Java programs.

Hardware ArchitectureJavaMemory Model
0 likes · 11 min read
Understanding the Java Memory Model and Its Interaction with Hardware Memory Architecture
IT Services Circle
IT Services Circle
Mar 22, 2025 · Backend Development

Nine Ways to Implement Asynchronous Programming in Java

This article introduces nine different approaches to achieve asynchronous programming in Java, including using Thread and Runnable, Executors thread pools, custom thread pools, Future and Callable, CompletableFuture, ForkJoinPool, Spring @Async, message queues, and Hutool's ThreadUtil, with code examples and usage tips.

CompletableFutureExecutorJava
0 likes · 15 min read
Nine Ways to Implement Asynchronous Programming in Java
Java Tech Enthusiast
Java Tech Enthusiast
Mar 22, 2025 · Backend Development

9 Ways to Implement Asynchronous Programming in Java

The article outlines nine practical approaches for asynchronous programming in Java—including low‑level Thread/Runnable, managed Executors and custom thread pools, Future/Callable, CompletableFuture, ForkJoinPool, Spring’s @Async annotation, message‑queue integration, and the Hutool ThreadUtil utility—offering a comprehensive toolbox for scalable, non‑blocking execution.

CompletableFutureExecutorJava
0 likes · 13 min read
9 Ways to Implement Asynchronous Programming in Java
Lobster Programming
Lobster Programming
Feb 20, 2025 · Backend Development

Will a JVM Exit When a Thread Runs Out of Memory? Deep Dive with Code

This article investigates whether the JVM terminates when a thread encounters an OutOfMemoryError, demonstrating through Spring Boot controllers and multithreaded examples how main and child threads, daemon settings, and explicit OOM handling affect JVM shutdown behavior.

JVMJavaOutOfMemoryError
0 likes · 6 min read
Will a JVM Exit When a Thread Runs Out of Memory? Deep Dive with Code
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Feb 10, 2025 · Backend Development

Master Java Asynchronous Programming: 7 Powerful Techniques with Code Samples

This article explains why asynchronous programming boosts Java application performance and walks through seven practical methods—Thread, FutureTask, CompletableFuture, Guava ListenableFuture, EA‑Async, Cactoos, and Jcabi‑Aspects—each illustrated with complete, runnable code examples.

Asynchronous ProgrammingCompletableFutureJava
0 likes · 14 min read
Master Java Asynchronous Programming: 7 Powerful Techniques with Code Samples
Deepin Linux
Deepin Linux
Jan 13, 2025 · Backend Development

C++ Timers in Asynchronous Programming: Implementation, Optimization Techniques, and Real‑World Case Study

This article explains why C++ timers are essential for asynchronous programming, presents three implementation approaches—including a simple thread‑chrono version, a Boost.Asio based timer, and a C++11 atomic/condition‑variable design—offers practical optimization tips such as precise intervals, thread‑pool reuse, efficient callbacks, and memory management, and demonstrates their impact with a network‑server case study comparing naïve and optimized solutions.

Asynchronous ProgrammingBoost.AsioC++
0 likes · 22 min read
C++ Timers in Asynchronous Programming: Implementation, Optimization Techniques, and Real‑World Case Study
FunTester
FunTester
Nov 28, 2024 · Backend Development

Java Multithreading Implementations

This article explains three common ways to create multithreaded Java programs—extending Thread, implementing Runnable, and using Lambda expressions—providing step‑by‑step instructions, code samples, console output, and a summary of each method’s advantages and appropriate use cases.

JavaRunnableThread
0 likes · 6 min read
Java Multithreading Implementations
Selected Java Interview Questions
Selected Java Interview Questions
Oct 11, 2024 · Backend Development

Graceful Thread Termination in Java: Strategies and Best Practices

The article explains why forcibly stopping a Java thread is unsafe, outlines common scenarios requiring thread exit, compares graceful and forced termination methods, and provides practical techniques such as flag checks and Thread.interrupt() with recommended interrupt‑handling strategies.

Graceful ShutdownInterruptJava
0 likes · 11 min read
Graceful Thread Termination in Java: Strategies and Best Practices
Cognitive Technology Team
Cognitive Technology Team
Sep 16, 2024 · Fundamentals

Handling Uncaught Exceptions in Java Threads

This article explains how Java handles uncaught exceptions in threads, demonstrates setting per‑thread, thread‑group, and global exception handlers, and provides complete code examples illustrating each approach along with their execution results.

Exception HandlingThreadconcurrency
0 likes · 5 min read
Handling Uncaught Exceptions in Java Threads
Architect's Guide
Architect's Guide
Aug 25, 2024 · Backend Development

Eight Ways to Implement Asynchronous Execution in Java

This article introduces eight common Java asynchronous implementation techniques—including raw threads, Future, CompletableFuture, Spring @Async, ApplicationEvent, message queues, third‑party utilities like Hutool ThreadUtil and Guava ListenableFuture—explaining their usage, code examples, advantages, and drawbacks for improving performance in scenarios such as sending SMS or emails.

CompletableFutureFutureGuava
0 likes · 14 min read
Eight Ways to Implement Asynchronous Execution in Java
Java Tech Enthusiast
Java Tech Enthusiast
Feb 28, 2024 · Backend Development

Understanding Java Processes, Threads, and Thread Creation Techniques

The article clarifies Java processes and threads using a game analogy, then demonstrates three thread‑creation techniques—extending Thread, implementing Runnable, and implementing Callable with FutureTask—while covering run vs start, thread control methods such as sleep, join, and daemon settings.

CallableJavaRunnable
0 likes · 9 min read
Understanding Java Processes, Threads, and Thread Creation Techniques
Selected Java Interview Questions
Selected Java Interview Questions
Nov 4, 2023 · Backend Development

Graceful Thread Termination in Java: Principles and Practices

The article explains why forcibly stopping a Java thread is unsafe, outlines common scenarios that require thread exit, compares graceful and forced termination, and presents practical techniques such as flag checks and Thread.interrupt() to achieve safe and predictable thread shutdown.

BackendGraceful ShutdownInterrupt
0 likes · 12 min read
Graceful Thread Termination in Java: Principles and Practices
Cognitive Technology Team
Cognitive Technology Team
Nov 1, 2023 · Fundamentals

Differences and Similarities between wait() and sleep() in Java

Both wait() and sleep() can pause a thread and enter waiting states, but wait() belongs to Object and requires synchronized blocks, releases the monitor lock, and must handle spurious wakeups, whereas sleep() is a Thread method that does not release locks and has simpler usage.

JavaSynchronizationThread
0 likes · 4 min read
Differences and Similarities between wait() and sleep() in Java
Sanyou's Java Diary
Sanyou's Java Diary
Oct 26, 2023 · Backend Development

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

Explore the fundamentals and advanced techniques of asynchronous programming in Java, from basic thread creation and thread pools to Future, FutureTask, CompletableFuture, and Spring Boot’s @Async annotation, including practical code examples, event handling, and message queue integration for high‑throughput systems.

Asynchronous ProgrammingCompletableFutureFuture
0 likes · 17 min read
Master Asynchronous Java: Threads, Futures, CompletableFuture & @Async
Cognitive Technology Team
Cognitive Technology Team
Oct 12, 2023 · Backend Development

Will the JVM Exit After an OutOfMemoryError? Explanation and Handling

An OutOfMemoryError does not always terminate the JVM; the JVM exits only when all non‑daemon threads have finished or the operating system kills the process, so proper exception handling and thread management are essential to keep the application alive.

Exception HandlingJVMJava
0 likes · 3 min read
Will the JVM Exit After an OutOfMemoryError? Explanation and Handling
Cognitive Technology Team
Cognitive Technology Team
Oct 11, 2023 · Fundamentals

Gracefully Stopping a Java Thread and the Difference Between isInterrupted() and interrupted()

The deprecated Thread.stop method should never be used; instead, Java threads are stopped gracefully by using a volatile stop flag or interrupting blocked threads, handling InterruptedException, and distinguishing between Thread.isInterrupted() (read‑only) and Thread.interrupted() (clears the flag).

Graceful ShutdownInterruptJava
0 likes · 4 min read
Gracefully Stopping a Java Thread and the Difference Between isInterrupted() and interrupted()