Tag

Condition

0 views collected around this technical thread.

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.

ConditionJUCJava
0 likes · 16 min read
Understanding Java J.U.C Locks: ReentrantLock, ReentrantReadWriteLock, and Condition
Full-Stack Internet Architecture
Full-Stack Internet Architecture
May 28, 2021 · Backend Development

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

This article provides a comprehensive explanation of Java's JUC origins, the design and implementation of AbstractQueuedSynchronizer (AQS), its template methods for exclusive and shared locks, the CLH queue mechanism, lock implementations, condition queues, and related code examples, illustrating how high‑performance concurrency primitives such as ReentrantLock, CountDownLatch, Semaphore, and ReentrantReadWriteLock work under the hood.

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

AQSConditionJUC
0 likes · 25 min read
Understanding Java's AbstractQueuedSynchronizer (AQS) and Concurrency Utilities
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Dec 16, 2020 · Backend Development

Using Condition to Replace wait/notify for Safer and Faster Java Thread Communication

This article explains why Java's Condition class should replace wait/notify for thread communication, demonstrates the thread‑livelock problem with notify, shows how Condition avoids it, compares performance with notifyAll, and provides complete code examples for producer‑consumer scenarios.

ConditionJavaThread Communication
0 likes · 13 min read
Using Condition to Replace wait/notify for Safer and Faster Java Thread Communication