luoyuan3471 commented on PR #4726:
URL: https://github.com/apache/hadoop/pull/4726#issuecomment-1212838719

   > @luoyuan3471 yes! ReadLock.lock() will call function(tryAcquireShared), 
this method will check whether the waiting queue first node is shared. if 
false, lock method will be blocked even if sharedCount(c) >0.But 
readLock.tryLock() do not need the check, it can get the csqueue readLock 
directly. you can diff tryReadLock() and Lock().
   
   Thanks for your explanation. I checked the code. You're right!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to