From 9267997d4a16bbb505c5ed0839f25f1a727b4276 Mon Sep 17 00:00:00 2001 From: Luke B Date: Wed, 28 Feb 2024 10:37:23 +0100 Subject: [PATCH 1/2] Fix a typo Just a minor typo. --- xml/System.Threading/ReaderWriterLockSlim.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Threading/ReaderWriterLockSlim.xml b/xml/System.Threading/ReaderWriterLockSlim.xml index b7c618cd43a..30b3b0cf542 100644 --- a/xml/System.Threading/ReaderWriterLockSlim.xml +++ b/xml/System.Threading/ReaderWriterLockSlim.xml @@ -487,7 +487,7 @@ ## Examples The following example shows how to use the method to enter the lock in upgradeable mode. A `finally` block is used to execute the method, ensuring that the caller exits upgradeable mode. - The method shown in the example retrieves the value associated with a key and compares it with a new value. If the value is unchanged, the method returns a status indicating no change. It no value is found for the key, the key/value pair is inserted. If the value has changed, it is updated. Upgradeable mode allows the thread to upgrade the read lock as needed, without risk of deadlocks. + The method shown in the example retrieves the value associated with a key and compares it with a new value. If the value is unchanged, the method returns a status indicating no change. If no value is found for the key, the key/value pair is inserted. If the value has changed, it is updated. Upgradeable mode allows the thread to upgrade the read lock as needed, without risk of deadlocks. The example uses the parameterless constructor to create the lock, so recursion is not allowed. Programming the is simpler and less prone to error when the lock does not allow recursion. From 4c44ef33d4ffabf8884f13a9c0a84839bc5043a4 Mon Sep 17 00:00:00 2001 From: Luke B Date: Thu, 29 Feb 2024 10:03:40 +0100 Subject: [PATCH 2/2] Fix another typo --- xml/System.Threading/ReaderWriterLockSlim.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Threading/ReaderWriterLockSlim.xml b/xml/System.Threading/ReaderWriterLockSlim.xml index 30b3b0cf542..4c89cf3f7ee 100644 --- a/xml/System.Threading/ReaderWriterLockSlim.xml +++ b/xml/System.Threading/ReaderWriterLockSlim.xml @@ -703,7 +703,7 @@ ## Examples The following example shows how to use a `finally` block to execute the method, ensuring that the caller exits upgradeable mode. - The method shown in the example retrieves the value associated with a key and compares it with a new value. If the value is unchanged, the method returns a status indicating no change. It no value is found for the key, the key/value pair is inserted. If the value has changed, it is updated. Upgradeable mode allows the thread to upgrade the read lock as needed, without risk of deadlocks. + The method shown in the example retrieves the value associated with a key and compares it with a new value. If the value is unchanged, the method returns a status indicating no change. If no value is found for the key, the key/value pair is inserted. If the value has changed, it is updated. Upgradeable mode allows the thread to upgrade the read lock as needed, without risk of deadlocks. The example uses the parameterless constructor to create the lock, so recursion is not allowed. Programming the is simpler and less prone to error when the lock does not allow recursion.