Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/debugger-libs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornosami <jasonimison@gmail.com>2022-07-20 20:13:51 +0300
committernosami <jasonimison@gmail.com>2022-07-20 21:20:51 +0300
commitd78df4d8be7f82a49e3f236e2ee32dcbb4a88c46 (patch)
tree1df89c7af17688c7374387676ab23e7dc5b54aec
parent9c3ed66d0b0e795c89346aafd0b3095c6a1b06b8 (diff)
Set options before Dispatchdev/nosami/set-options-before-dispatch
This is a feedback fix in response to https://github.com/mono/debugger-libs/pull/371#discussion_r925712902
-rw-r--r--Mono.Debugging/Mono.Debugging.Client/DebuggerSession.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Mono.Debugging/Mono.Debugging.Client/DebuggerSession.cs b/Mono.Debugging/Mono.Debugging.Client/DebuggerSession.cs
index 9b38e5a..0a8ee83 100644
--- a/Mono.Debugging/Mono.Debugging.Client/DebuggerSession.cs
+++ b/Mono.Debugging/Mono.Debugging.Client/DebuggerSession.cs
@@ -410,9 +410,10 @@ namespace Mono.Debugging.Client
if (options == null)
throw new ArgumentNullException (nameof (options));
+ Interlocked.Exchange (ref this.options, options);
+
Dispatch (delegate {
try {
- this.options = options;
OnRunning ();
OnRun (startInfo);
} catch (Exception ex) {
@@ -444,9 +445,10 @@ namespace Mono.Debugging.Client
if (options == null)
throw new ArgumentNullException (nameof (options));
+ Interlocked.Exchange (ref this.options, options);
+
Dispatch (delegate {
try {
- this.options = options;
OnRunning ();
OnAttachToProcess (proc);
attached = true;