diff options
author | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2022-03-16 14:50:58 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-16 14:50:58 +0300 |
commit | faed4edfe44395eefaba8c9e13000ce9bdeec4eb (patch) | |
tree | e3574508797800a316b65528e0775fb6662daba0 | |
parent | 656eac83caac2bcce973df1eec8c30414d02f2dd (diff) |
Change semantics of the BeginInvoke change to swallow exceptions as it used to (#356)
Co-authored-by: Jb Evain <jb@evain.net>
-rw-r--r-- | Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs b/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs index 319a4ce..1c7d5d1 100644 --- a/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs +++ b/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs @@ -1758,7 +1758,15 @@ namespace Mono.Debugger.Soft /* Run the callback on a tp thread to avoid blocking the receive thread */ PacketReader r = new PacketReader (this, p); ThreadPool.QueueUserWorkItem (s => { - cb (r); + // Catch all exceptions to revert to + // BeginInvoke behavior + try + { + cb (r); + } + catch + { + } }); }; reply_cb_counts [id] = count; |