Tagged articles

ReentrantReadWriteLock

5 articles · Page 1 of 1
Senior Xiao Ying
Senior Xiao Ying
Feb 6, 2026 · Fundamentals

StampedLock: The High‑Performance Java 8 Lock That Outpaces ReentrantReadWriteLock

StampedLock, introduced in Java 8, provides three lock modes—including an optimistic read that uses a 64‑bit stamp—to achieve higher throughput than ReentrantReadWriteLock in read‑heavy workloads, and the article explains its internal state, usage patterns, code examples, and important limitations.

Java 8Java concurrencyReentrantReadWriteLock
0 likes · 7 min read
StampedLock: The High‑Performance Java 8 Lock That Outpaces ReentrantReadWriteLock
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.

JavaReadWriteLockReentrantReadWriteLock
0 likes · 5 min read
Understanding Java ReentrantReadWriteLock: Read‑Write Sharing and Mutual Exclusion
Java Backend Technology
Java Backend Technology
Oct 12, 2017 · Backend Development

Mastering Java’s ReentrantReadWriteLock: When to Use Read/Write Locks

This article explains Java’s ReentrantReadWriteLock, detailing its shared read lock and exclusive write lock behavior, comparing it to ReentrantLock and concurrent collections, and provides clear code examples demonstrating read‑read sharing, write‑write exclusion, and read‑write mutual exclusion.

JavaReentrantReadWriteLockconcurrency
0 likes · 3 min read
Mastering Java’s ReentrantReadWriteLock: When to Use Read/Write Locks