0

I noticed, that Java's ReentrantReadWriteLock is different in API versions <9 and >=9. Especially important for me, the method getReadHoldCount() isn't available in the older version.

Now my question is, how do I detect if a ReadLock is held by the current thread without this method? I only see the possibility of a manual counter or maybe a wrapper class, is there a built-in way to achieve this?

Kirill Rakhman
  • 42,195
  • 18
  • 124
  • 148

0 Answers0