Commits

Anonymous committed a215a66 Draft

clarified comments in ReaderWriterUpdateLock

Comments (0)

Files changed (1)

Cineraria.Concurrency/ReaderWriterUpdateLock.cs

                 return false;
             }
 
-            // Since AcquireWriter acquires turnstile before WritePermission,
-            // ReadPermission can be released here without a writer potentially
-            // acqiring WritePermission before this thread.
+            // Since AcquireWriter and AcquireReader acquire the turnstile
+            // their respective permissions, ReadPermission can be released
+            // here without another thread acqiring WritePermission before this
+            // one.
             this.ReadPermission.Release();
-
-            // Don't have to attempt here because it is guaranteed that no
-            // other thread is attempting to acquire WritePermission.
             this.WritePermission.Acquire();
             this._updatePermission.Release();
             return true;