[concurrency-interest] maximum number of shared lock forReentrantReadWriteLock

Tim Peierls tim at peierls.net
Thu Jul 7 13:22:25 EDT 2005


Tim Peierls wrote:
>> If acquires is 0x7FFF, then that's the maximum of 65535 that Tim 
>> mentioned below, so throwing an exception is correct in this case.
> 
> 0x7FFF is 32767 -- now I think Jinsong Hu is right. You get an overflow 
> exception when acquiring the 32768th read lock.

And if so, this is either a doc bug or code bug. As a doc bug it could be 
fixed by changing 65536 to 32767. As a code bug it could be fixed by 
changing the overflow test.

But maybe this has already been caught and fixed?

--tim



More information about the Concurrency-interest mailing list