From b0d2e8a9020152ae71096d42f4d6481c60c43624 Mon Sep 17 00:00:00 2001 From: kkokosa Date: Mon, 15 Jun 2020 10:08:42 +0200 Subject: [PATCH 1/2] Simple fix for thread priority sample snippet --- .../System.Threading.ThreadPriority/cs/Example1.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/csharp/VS_Snippets_CLR_System/System.Threading.ThreadPriority/cs/Example1.cs b/samples/snippets/csharp/VS_Snippets_CLR_System/System.Threading.ThreadPriority/cs/Example1.cs index 5ef90c17d22..bbd05c77095 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR_System/System.Threading.ThreadPriority/cs/Example1.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR_System/System.Threading.ThreadPriority/cs/Example1.cs @@ -29,7 +29,7 @@ static void Main() class PriorityTest { - static bool loopSwitch; + volatile static bool loopSwitch; [ThreadStatic] static long threadCount = 0; public PriorityTest() From 36d8f1d378d8eaf87fa3d531c4f4ab5f9fa279f6 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Mon, 3 Aug 2020 12:58:34 -0700 Subject: [PATCH 2/2] Update samples/snippets/csharp/VS_Snippets_CLR_System/System.Threading.ThreadPriority/cs/Example1.cs Co-authored-by: Koundinya Veluri --- .../System.Threading.ThreadPriority/cs/Example1.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/csharp/VS_Snippets_CLR_System/System.Threading.ThreadPriority/cs/Example1.cs b/samples/snippets/csharp/VS_Snippets_CLR_System/System.Threading.ThreadPriority/cs/Example1.cs index bbd05c77095..13f5e1aafe3 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR_System/System.Threading.ThreadPriority/cs/Example1.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR_System/System.Threading.ThreadPriority/cs/Example1.cs @@ -29,7 +29,7 @@ static void Main() class PriorityTest { - volatile static bool loopSwitch; + static volatile bool loopSwitch; [ThreadStatic] static long threadCount = 0; public PriorityTest()