AQS and lock classes refresh

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

AQS and lock classes refresh

JSR166 Concurrency mailing list

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 the read-reentrancy requirements. (Even if you cannot replace
usages with StampedLock, you may be able to use: ReadWriteLock r = new
StampedLock().asReadWriteLock()).

We'd like to leave these uncommitted from openjdk for a while just to
make sure there are no surprises. Please help test them by following the
instructions at
http://gee.cs.oswego.edu/dl/concurrency-interest/index.html also pasted
below. Feedback would be welcome.

You may be able to use these versions now, without waiting for JDK
releases, by obtaining jsr166 jar, then running java using the option
java --patch-module java.base="$DIR/jsr166.jar", where DIR is the full
file prefix.

-Doug

_______________________________________________
Concurrency-interest mailing list
[hidden email]
http://cs.oswego.edu/mailman/listinfo/concurrency-interest