[concurrency-interest] StampedLock

Aleksey Shipilev aleksey.shipilev at oracle.com
Fri Oct 12 12:11:06 EDT 2012

On 10/12/2012 06:19 PM, Doug Lea wrote:
> As promised (several months ago) an initial version of
> class jsr166e.StampedLock is now available. This is
> a combined write/read/optimistic lock that has some nice
> properties and good performance. For description, see
> http://gee.cs.oswego.edu/dl/jsr166/dist/jsr166edocs/jsr166e/StampedLock.html
> And see the usual links from
>   http://gee.cs.oswego.edu/dl/concurrency-interest/index.html
> for jsr166e jars and sources.
> Reports about usage experiences would be very welcome!

Not particularly a usage experience, but semantics question. What are
the memory semantics of SL methods? I would naively presume it dubs
usual RWLock semantics ("!hb" denotes the known "unspecified" cases):
   - unlock       hb readLock
   - unlockRead  !hb readLock
   - unlockWrite  hb readLock
   - unlock       hb tryOptimisticRead
   - unlockRead  !hb tryOptimisticRead
   - unlockWrite  hb tryOptimisticRead
   - unlock*      hb writeLock


More information about the Concurrency-interest mailing list