
27 Mar
2014
27 Mar
'14
5:11 p.m.
AMDG On 03/27/2014 09:09 AM, Elad Moshe wrote:
If both threads tried to upgrade, you would have a deadlock.
But how is it possible? isn't the upgrade operation atomic? if the 2 threads try to upgrade, one will succeed and the other one will block until the first thread will unlock.
If it worked this way, it would mean that upgrade lock would not exclude concurrent writes, which completely defeats the point of using it in the first place. In Christ, Steven Watanabe