thepointman.dev_

Courses / Java Concurrency

Explicit Locks

advanced8 lessons

Why ReentrantLock exists when we have synchronized, tryLock with timeout, lockInterruptibly, fair vs unfair queuing, Condition as a superior wait/notify, ReadWriteLock's read/write separation, writer starvation, and StampedLock's optimistic read — the fastest read-mostly data structure primitive.

// Lessons

  1. 01

    Why ReentrantLock When We Have synchronized?

    soon
  2. 02

    ReentrantLock — tryLock, lockInterruptibly, Fair vs Unfair

    soon
  3. 03

    ReentrantLock Must Be in try-finally — The Unlock Guarantee

    soon
  4. 04

    Condition — The Superior wait/notify with Explicit Locks

    soon
  5. 05

    ReadWriteLock — Read-Write Separation for Low-Write Workloads

    soon
  6. 06

    ReadWriteLock: Writer Starvation and Mitigation

    soon
  7. 07

    StampedLock — Optimistic Reads and the Validate Pattern

    soon
  8. 08

    Deadlock with Explicit Locks — Detection and Prevention

    soon