Reentrantlock AQS source code analysis

Speaking of AQS, we have to say that the classic ReentrantLock is the best embodiment of AQS However, we can briefly talk about AQS characteristics first What is AQS? Abstract queue synchronizer All request threads form a CLH queue. When a thread finishes executing lock When you unlock, your subsequent nodes will be activated. The executing ...

Added by bedted on Mon, 07 Feb 2022 13:06:47 +0200

ReentrantLock in JUC from Java thread to kotlin coroutine

Previous: From Java thread to kotlin coroutine util. concurrent. Interfaces and implementation classes in locks package ReentrantLock The re-entry Lock can be locked many times, and the Lock interface is implemented Unlike synchronized, synchronized locks and unlocks automatically, while the implementation class of Lock interface needs to Lo ...

Added by H4mm3r3r on Sat, 29 Jan 2022 15:11:47 +0200