The method acquireUpdateLock() has some similar meaning with acquireLoadLock, so it should be simplified.
Simplify the acquireUpdateLock method.
Based on your patch I have added some more improvements. Could you please check?
I just carefully check your patch. Your patch have the same meaning with the old implementation, so I think your patch is right.
Your patch is a big improvement to my patch
Patch committed as is.