8005697: Add StampedLock - JEP 155 (original) (raw)

Martin Buchholz martinrb at google.com
Tue Jan 29 08:04:45 UTC 2013


On Mon, Jan 28, 2013 at 4:01 PM, Doug Lea <dl at cs.oswego.edu> wrote:

I also noticed that I had failed to include the simple toString-based informal debug/monitoring aids that we've been doing for synchronizers.

Which suggests looking for other missing methods by comparing lock-like classes. Looking at the implementation of toString and comparing with RRWL suggests (untested):

Index: src/main/java/util/concurrent/locks/StampedLock.java

RCS file: /export/home/jsr166/jsr166/jsr166/src/main/java/util/concurrent/locks/StampedLock.java,v retrieving revision 1.16 diff -u -r1.16 StampedLock.java --- src/main/java/util/concurrent/locks/StampedLock.java 28 Jan 2013 23:54:42 -0000 1.16 +++ src/main/java/util/concurrent/locks/StampedLock.java 29 Jan 2013 07:56:20 -0000 @@ -886,6 +886,23 @@ } }

@@ -896,15 +913,11 @@ * @return a string identifying this lock, as well as its lock state */ public String toString() {



More information about the core-libs-dev mailing list