From 6ddbbc50ef422c8fddd54a18a3a72a78aa7c6cf4 Mon Sep 17 00:00:00 2001 From: Richard Szalay Date: Tue, 15 Oct 2024 10:10:17 +1100 Subject: [PATCH 1/2] Fix Lock "compiler speclet" URL --- xml/System.Threading/Lock.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Threading/Lock.xml b/xml/System.Threading/Lock.xml index ea145acaf9e..c27ad39a459 100644 --- a/xml/System.Threading/Lock.xml +++ b/xml/System.Threading/Lock.xml @@ -30,7 +30,7 @@ It is recommended to use the method w :::code language="csharp" source="~/snippets/csharp/System.Threading/Lock/Overview/UsagePatterns.cs" id="Snippet1"::: -When using the C# `lock` keyword or similar to enter and exit a lock, the type of the expression must be precisely `System.Threading.Lock`. If the type of the expression is anything else, such as `Object` or a generic type like `T`, a different implementation that is not interchangeable can be used instead (such as ). For more information, see the relevant [compiler speclet](https://github.com/dotnet/csharplang/blob/main/proposals/lock-object.md). +When using the C# `lock` keyword or similar to enter and exit a lock, the type of the expression must be precisely `System.Threading.Lock`. If the type of the expression is anything else, such as `Object` or a generic type like `T`, a different implementation that is not interchangeable can be used instead (such as ). For more information, see the relevant [compiler speclet](https://github.com/dotnet/csharplang/blob/main/proposals/csharp-13.0/lock-object.md). can interrupt threads that are waiting to enter a lock. On Windows STA threads, waits for locks allow message pumping that can run other code on the same thread during a wait. Some features of the waits can be overridden by a custom . From 0aac76eab76eeebe96fe8f16809fee670beac95a Mon Sep 17 00:00:00 2001 From: Richard Szalay Date: Wed, 16 Oct 2024 13:02:04 +1100 Subject: [PATCH 2/2] Update Lock.xml speclet URL to published --- xml/System.Threading/Lock.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Threading/Lock.xml b/xml/System.Threading/Lock.xml index c27ad39a459..2882e6c0fcb 100644 --- a/xml/System.Threading/Lock.xml +++ b/xml/System.Threading/Lock.xml @@ -30,7 +30,7 @@ It is recommended to use the method w :::code language="csharp" source="~/snippets/csharp/System.Threading/Lock/Overview/UsagePatterns.cs" id="Snippet1"::: -When using the C# `lock` keyword or similar to enter and exit a lock, the type of the expression must be precisely `System.Threading.Lock`. If the type of the expression is anything else, such as `Object` or a generic type like `T`, a different implementation that is not interchangeable can be used instead (such as ). For more information, see the relevant [compiler speclet](https://github.com/dotnet/csharplang/blob/main/proposals/csharp-13.0/lock-object.md). +When using the C# `lock` keyword or similar to enter and exit a lock, the type of the expression must be precisely `System.Threading.Lock`. If the type of the expression is anything else, such as `Object` or a generic type like `T`, a different implementation that is not interchangeable can be used instead (such as ). For more information, see the relevant [compiler speclet](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-13.0/lock-object). can interrupt threads that are waiting to enter a lock. On Windows STA threads, waits for locks allow message pumping that can run other code on the same thread during a wait. Some features of the waits can be overridden by a custom .