From 02b829c4d861e84a922893a874cfc11f78bd1c17 Mon Sep 17 00:00:00 2001 From: monojenkins Date: Tue, 11 Feb 2020 03:16:19 -0500 Subject: [PATCH] Add volatile for cross thread communication. (#31964) This test is flaky. Maybe this helps. Otherwise I'll dig in later. Co-authored-by: Jay Krell --- src/mono/mono/tests/bug-10127.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mono/mono/tests/bug-10127.cs b/src/mono/mono/tests/bug-10127.cs index 389616e..32ca630 100644 --- a/src/mono/mono/tests/bug-10127.cs +++ b/src/mono/mono/tests/bug-10127.cs @@ -37,7 +37,7 @@ namespace WeakReferenceTest Random rand = new Random(seed); - bool alive; + volatile bool alive; Thread thread; public void Start() -- 2.7.4