Tag

ReentrantReadWriteLock

0 views collected around this technical thread.

YunZhu Net Technology Team
YunZhu Net Technology Team
Dec 2, 2021 · Fundamentals

Overview and Implementation of an Upgradable ReentrantReadWriteLock in Java

This article explains the principles of Java's ReentrantReadWriteLock, details lock downgrade and upgrade mechanisms, provides a full source analysis of read and write lock implementations, and presents a custom upgradable lock with test code and performance observations.

ConcurrencyLockUpgradeMultithreading
0 likes · 22 min read
Overview and Implementation of an Upgradable ReentrantReadWriteLock in Java
Selected Java Interview Questions
Selected Java Interview Questions
Sep 24, 2021 · Backend Development

Understanding Java ReentrantReadWriteLock: Read‑Write Sharing and Mutual Exclusion

This article explains how Java's ReentrantReadWriteLock provides read‑write separation, allowing concurrent reads while enforcing exclusive access for writes, and demonstrates its behavior with sample code and thread‑execution results that illustrate read‑read sharing, read‑write mutual exclusion, and write‑write mutual exclusion.

ConcurrencyMultithreadingReentrantReadWriteLock
0 likes · 5 min read
Understanding Java ReentrantReadWriteLock: Read‑Write Sharing and Mutual Exclusion
Sohu Tech Products
Sohu Tech Products
Feb 19, 2020 · Backend Development

Understanding Java's ReentrantReadWriteLock: Concepts, Implementation, and Usage

This article explains Java's ReentrantReadWriteLock, covering the motivation for read‑write locks, their properties, a simple implementation example, lock upgrade and downgrade mechanisms, the internal AQS‑based design, fairness modes, and the roles of ReadLock and WriteLock classes.

ConcurrencyReentrantReadWriteLockSynchronization
0 likes · 10 min read
Understanding Java's ReentrantReadWriteLock: Concepts, Implementation, and Usage