Tag

JUC

1 views collected around this technical thread.

Sohu Tech Products
Sohu Tech Products
Feb 19, 2025 · Fundamentals

Deep Dive into ReentrantLock: Fair Lock vs Non-Fair Lock Implementation Principles

The article explains Java’s ReentrantLock implementation, contrasting fair locks that queue threads in request order with non‑fair locks that allow immediate acquisition, detailing the internal Sync, FairSync and NonfairSync classes, lock/unlock mechanisms, performance trade‑offs, and guidance on selecting the appropriate lock type.

AQSFair LockJUC
0 likes · 19 min read
Deep Dive into ReentrantLock: Fair Lock vs Non-Fair Lock Implementation Principles
Cognitive Technology Team
Cognitive Technology Team
Oct 5, 2023 · Backend Development

Lock‑Free Concurrency in Java: CAS, volatile and JUC Utilities

This article explains how Java achieves lock‑free concurrency using CAS and volatile for optimistic locking, discusses its advantages and drawbacks such as the ABA problem and contention hotspots, and presents solutions including versioned CAS classes and contention‑reduction techniques provided by the JUC package.

AtomicCASConcurrency
0 likes · 6 min read
Lock‑Free Concurrency in Java: CAS, volatile and JUC Utilities
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Nov 30, 2022 · Backend Development

Understanding Java J.U.C Locks: ReentrantLock, ReentrantReadWriteLock, and Condition

This article introduces Java's java.util.concurrent (J.U.C) package, explains its lock mechanisms—including Lock, ReentrantLock, ReentrantReadWriteLock, and Condition—provides detailed code examples, and discusses lock types such as fair, non‑fair, and read/write locks for effective multithreaded synchronization.

ConcurrencyConditionJUC
0 likes · 16 min read
Understanding Java J.U.C Locks: ReentrantLock, ReentrantReadWriteLock, and Condition
Top Architect
Top Architect
Apr 5, 2022 · Backend Development

Deep Dive into Java's AbstractQueuedSynchronizer (AQS) and Concurrency Utilities

This article provides an in‑depth analysis of Java's AbstractQueuedSynchronizer (AQS), explaining its internal data structures, lock acquisition and release mechanisms for ReentrantLock and ReentrantReadWriteLock, and demonstrates how higher‑level concurrency utilities such as Condition, CountDownLatch, CyclicBarrier, and Semaphore are built on top of AQS.

AQSConcurrencyJUC
0 likes · 28 min read
Deep Dive into Java's AbstractQueuedSynchronizer (AQS) and Concurrency Utilities
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.

ConcurrencyJUCJava
0 likes · 23 min read
Systematic Overview of Java Concurrency and the J.U.C Framework
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jan 13, 2021 · Backend Development

Understanding Java's AbstractQueuedSynchronizer (AQS) and Concurrency Utilities

This article provides an in-depth explanation of Java's AbstractQueuedSynchronizer (AQS) framework, covering its role in JUC concurrency utilities such as locks, semaphores, CountDownLatch, ReentrantReadWriteLock, and Condition, including template methods, state management, node structures, queue algorithms, and practical code examples.

AQSConcurrencyCondition
0 likes · 25 min read
Understanding Java's AbstractQueuedSynchronizer (AQS) and Concurrency Utilities
Xianyu Technology
Xianyu Technology
Sep 27, 2020 · Backend Development

Design of an Asynchronous Component with Monitoring, Fault Tolerance, and Zero‑Cost Integration

The article presents a design for an asynchronous component that is monitorable, fault‑tolerant, and integrates with zero overhead, compares Akka, RxJava, and a custom JUC‑based implementation, and selects the latter—using extended Callables and a CountDownLatch—to track business units, handle timeouts, and provide fallback behavior.

ConcurrencyJUCJava
0 likes · 8 min read
Design of an Asynchronous Component with Monitoring, Fault Tolerance, and Zero‑Cost Integration
macrozheng
macrozheng
Sep 3, 2020 · Backend Development

Mastering Java Concurrent Queues: When to Use Blocking, Non‑Blocking, and Transfer Queues

This article provides a comprehensive overview of Java's concurrent queue implementations, explaining the differences between blocking and non‑blocking queues, their underlying mechanisms, typical use‑cases, and code examples for classes such as ArrayBlockingQueue, LinkedBlockingQueue, PriorityBlockingQueue, DelayQueue, SynchronousQueue, LinkedTransferQueue, and LinkedBlockingDeque.

BlockingQueueConcurrencyJUC
0 likes · 16 min read
Mastering Java Concurrent Queues: When to Use Blocking, Non‑Blocking, and Transfer Queues
Selected Java Interview Questions
Selected Java Interview Questions
Jun 2, 2020 · Backend Development

Deep Dive into ThreadPoolExecutor: Principles, State Control, and Source Code Analysis

This article provides a comprehensive analysis of Java's ThreadPoolExecutor, covering its underlying JUC synchronizer framework, core and non‑core thread handling, state management, key configuration parameters, and detailed walkthrough of critical source‑code methods such as execute, addWorker, and runWorker, supplemented with illustrative code examples.

AQSConcurrencyCoreThreadPool
0 likes · 30 min read
Deep Dive into ThreadPoolExecutor: Principles, State Control, and Source Code Analysis
Selected Java Interview Questions
Selected Java Interview Questions
May 18, 2020 · Backend Development

Understanding Java's java.util.concurrent (J.U.C) Framework and AQS Mechanism

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
Understanding Java's java.util.concurrent (J.U.C) Framework and AQS Mechanism