[concurrency-interest] RE: ReentrantWriterPreferenceReadWriteLock -- Deadlock if reader releases lock more times than it aquires lock

Doug Lea dl@cs.oswego.edu
Wed, 4 Dec 2002 08:42:11 -0500


Mazda,

Thanks for the report about dl.u.c version. I agree that it is in bad
taste to throw NullPointerException rather than some more meaningful
exception, and it should also completely preserve state upon
exception. This will be in next update.

The JSR-166 implementation of j.u.c.ReentrantReadWriteLock (the only
concrete RW lock to be supplied) will be a different algorithm -- a
variant of the one now in dl.u.c.FIFOReadWriteLock that adds
reentrance. It will also throw nicer exceptions on misuse.

-- 
Doug Lea, Computer Science Department, SUNY Oswego, Oswego, NY 13126 USA
dl@cs.oswego.edu 315-312-2688 FAX:315-312-5424 http://gee.cs.oswego.edu/