From 9d2c49b4c9f67729f358df6fc5c8555d684ad5e3 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Mon, 1 Apr 2019 20:43:40 -0400 Subject: [PATCH] Fix build break due to nullable PR conflicts (#23641) --- .../shared/System/Threading/CancellationTokenSource.cs | 2 +- .../shared/System/Threading/ManualResetEventSlim.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/System.Private.CoreLib/shared/System/Threading/CancellationTokenSource.cs b/src/System.Private.CoreLib/shared/System/Threading/CancellationTokenSource.cs index 998d688..9bbd5a7 100644 --- a/src/System.Private.CoreLib/shared/System/Threading/CancellationTokenSource.cs +++ b/src/System.Private.CoreLib/shared/System/Threading/CancellationTokenSource.cs @@ -682,7 +682,7 @@ namespace System.Threading // Transition to the target syncContext and continue there. node.SynchronizationContext.Send(s => { - var n = (CallbackNode)s; + var n = (CallbackNode)s!; n.Partition.Source.ThreadIDExecutingCallbacks = Environment.CurrentManagedThreadId; n.ExecuteCallback(); }, node); diff --git a/src/System.Private.CoreLib/shared/System/Threading/ManualResetEventSlim.cs b/src/System.Private.CoreLib/shared/System/Threading/ManualResetEventSlim.cs index 9eeba92..c4bdafa 100644 --- a/src/System.Private.CoreLib/shared/System/Threading/ManualResetEventSlim.cs +++ b/src/System.Private.CoreLib/shared/System/Threading/ManualResetEventSlim.cs @@ -683,8 +683,8 @@ namespace System.Threading /// /// Private helper method to wake up waiters when a cancellationToken gets canceled. /// - private static Action s_cancellationTokenCallback = new Action(CancellationTokenCallback); - private static void CancellationTokenCallback(object obj) + private static Action s_cancellationTokenCallback = new Action(CancellationTokenCallback); + private static void CancellationTokenCallback(object? obj) { Debug.Assert(obj is ManualResetEventSlim, "Expected a ManualResetEventSlim"); ManualResetEventSlim mre = (ManualResetEventSlim)obj; -- 2.7.4