JDK-8229442 : AQS and lock classes refresh
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util.concurrent
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-08-12
  • Updated: 2023-10-11
  • Resolved: 2019-09-14
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 14
14 b15Fixed
Related Reports
CSR :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
As announced by Doug Lea on
https://concurrency.markmail.org/thread/kfdv6tg3tnutl4ts

```
The java.util.concurrent.locks classes were among the first classes
written for j.u.c, and were in increasing need of attention as new
low-level support and new techniques became available. I did a
reimplementation of most internals, keeping most of the same basic
algorithms. Among other improvements, most locks (including
ReentrantLock) and Conditions are now a bit faster, which also makes
most BlockingQueues etc faster. Even StampedLock got a refresh; it is
still our fastest and in many cases best lock. On the other hand,
prospects for improving  ReentrantReadWriteLock are not good, mainly
because of the read-reentrancy requirements. (Even if you cannot replace
usages with StampedLock, you may be able to use: ReadWriteLock r = new
StampedLock().asReadWriteLock()).
```

We want to be able to make (careful!) use of relaxed atomics introduced in recent jdk releases.

We want to prepare for the Loom project.  Loom changes the cost model of spinning/blocking and strongly prefers use of j.u.c. locks over builtin locks (in 2019).
Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/51cd29502ea9 User: martin Date: 2019-09-14 18:29:22 +0000
14-09-2019