diff options
author | nosami <jasonimison@gmail.com> | 2021-11-25 19:06:20 +0300 |
---|---|---|
committer | nosami <jasonimison@gmail.com> | 2021-11-25 19:06:20 +0300 |
commit | acecc75dc23fb2e51b5e3d2b7cb0d4a8ac564e1c (patch) | |
tree | ff21709bef44e3dad526d5d6efeb44879bf03db8 | |
parent | 330024cd16ac87805a420dce514a9317158c8bf4 (diff) |
Convert BeginInvoke usage to Task.Run for dotnet
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1433487
-rw-r--r-- | Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs b/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs index 1285b73..531b6a4 100644 --- a/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs +++ b/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs @@ -341,10 +341,10 @@ namespace Mono.Debugger.Soft ((ManualResetEvent)r.AsyncWaitHandle).Set (); if (r.Callback != null) - r.Callback.BeginInvoke (r, null, null); + Task.Run (() => r.Callback.Invoke (r)); } - internal static InvokeResult EndInvokeMethodInternalWithResult (IAsyncResult asyncResult) { + internal static InvokeResult EndInvokeMethodInternalWithResult (IAsyncResult asyncResult) { if (asyncResult == null) throw new ArgumentNullException ("asyncResult"); @@ -473,7 +473,7 @@ namespace Mono.Debugger.Soft r2.Exception = exc; } - r.Callback.BeginInvoke (r2, null, null); + Task.Run (() => r.Callback.Invoke (r2)); } } } |