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:
authorArseny Chernyaev <arseny.chernyaev@jetbrains.com>2017-01-13 15:44:57 +0300
committerArseny Chernyaev <arseny.chernyaev@jetbrains.com>2017-01-13 15:44:57 +0300
commite3e665525a59823563c23babaf5d0e29a44a644a (patch)
tree4fa0aacb3a7db6fca4f13d40968db06cd1e8b2c7 /Mono.Debugger.Soft
parent1c767a2ada0b07365cca56a7ef8a7f26d1d030ca (diff)
caching thread state
Diffstat (limited to 'Mono.Debugger.Soft')
-rw-r--r--Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs b/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs
index 5dbe5eb..938a4ca 100644
--- a/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs
+++ b/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;
}
}