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

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Karlaš <david.karlas@xamarin.com>2017-06-16 09:19:07 +0300
committerDavid Karlaš <david.karlas@xamarin.com>2017-06-16 09:23:29 +0300
commit3f899a3198843f21f70ae2196ee6af2566340fd7 (patch)
tree306f211f17c6ee40dd0d252a8818b7591c5bd1a3 /mcs/class/Mono.Debugger.Soft
parentdd15ef7b68310605c25e254bb29fa115ae820ac4 (diff)
caching thread state
https://github.com/mono/debugger-libs/commit/e3e665525a59823563c23babaf5d0e29a44a644a
Diffstat (limited to 'mcs/class/Mono.Debugger.Soft')
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs
index 5dbe5eb1fb5..938a4ca8a8c 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs
@@ -13,6 +13,8 @@ namespace Mono.Debugger.Soft
ManualResetEvent fetchingEvent = new ManualResetEvent (false);
ThreadInfo info;
StackFrame[] frames;
+ bool threadStateInvalid = true;
+ ThreadState threadState;
internal ThreadMirror (VirtualMachine vm, long id) : base (vm, id) {
}
@@ -30,6 +32,7 @@ namespace Mono.Debugger.Soft
internal void InvalidateFrames () {
cacheInvalid = true;
+ threadStateInvalid = true;
}
internal void FetchFrames (bool mustFetch = false) {
@@ -91,7 +94,11 @@ namespace Mono.Debugger.Soft
public ThreadState ThreadState {
get {
- return (ThreadState)vm.conn.Thread_GetState (id);
+ if (threadStateInvalid) {
+ threadState = (ThreadState) vm.conn.Thread_GetState (id);
+ threadStateInvalid = false;
+ }
+ return threadState;
}
}