This story on HackerNoon has a decentralized backup on Sia.
Transaction ID: 4uIvRyLo9mL8WiXlGWJDXsEoB-azyXK0Tp_Tf0HeJSs
Cover

Brief introduction to AbstractQueuedSynchronizer by Using a Simple Mutex Example

Written by @eric.liu.developer | Published on 2017/6/4

TL;DR
AbstractQueuedSynchronizer is a masterpiece java class authored by Doug Lea. It is the underlying data structure that provides the acquire, tryAcquire, release, tryRelease … interface to CountDownLatch, Semaphore, ReentrantLock, and ReadWriteLock. So AbstractQueuedSynchronizer is basically the backbone of java.util.concurrent package.

AbstractQueuedSynchronizer is a masterpiece java class authored by Doug Lea. It is the underlying data structure that provides the acquire, tryAcquire, release, tryRelease … interface to CountDownLatch, Semaphore, ReentrantLock, and ReadWriteLock. So AbstractQueuedSynchronizer is basically the backbone of java.util.concurrent package.

I did a short presentation on AQS and try to explain how the simple acquire and release work, hope you will enjoy it.

Here is the code of the Mutex implemented using AQS:

In this video, I explained how this class works and the underlying mechanisms in AQS.

[story continues]


Written by
@eric.liu.developer
Software Developer

Topics and
tags
programming|java|java-concurrency|doug-lea|mutex
This story on HackerNoon has a decentralized backup on Sia.
Transaction ID: 4uIvRyLo9mL8WiXlGWJDXsEoB-azyXK0Tp_Tf0HeJSs