[concurrency-interest] maximum number
of sharedlock forReentrantReadWriteLock
gregg at cytetech.com
Fri Jul 8 19:44:07 EDT 2005
Dawid Kurzyniec wrote:
> Doug Lea wrote:
>>> You get an overflow exception when acquiring the 32768th read lock.
>> Yes, sorry; the specified value should have been 32767.
>> This javadoc will (hopefully) be fixed for Mustang.
> Wouldn't it be better to modify the implementation to use unsigned
> arithmetic? E.g. using:
If the value is masked by 0xffff0000, then it is possible to just do
(0xffff & (value >> 16)) to get a 65535 max value.
More information about the Concurrency-interest