File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Mono.Debugger.Soft/Mono.Debugger.Soft Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ public class ThreadMirror : ObjectMirror
13
13
ManualResetEvent fetchingEvent = new ManualResetEvent ( false ) ;
14
14
ThreadInfo info ;
15
15
StackFrame [ ] frames ;
16
+ bool threadStateInvalid = true ;
17
+ ThreadState threadState ;
16
18
17
19
internal ThreadMirror ( VirtualMachine vm , long id ) : base ( vm , id ) {
18
20
}
@@ -30,6 +32,7 @@ public StackFrame[] GetFrames () {
30
32
31
33
internal void InvalidateFrames ( ) {
32
34
cacheInvalid = true ;
35
+ threadStateInvalid = true ;
33
36
}
34
37
35
38
internal void FetchFrames ( bool mustFetch = false ) {
@@ -91,7 +94,11 @@ public string Name {
91
94
92
95
public ThreadState ThreadState {
93
96
get {
94
- return ( ThreadState ) vm . conn . Thread_GetState ( id ) ;
97
+ if ( threadStateInvalid ) {
98
+ threadState = ( ThreadState ) vm . conn . Thread_GetState ( id ) ;
99
+ threadStateInvalid = false ;
100
+ }
101
+ return threadState ;
95
102
}
96
103
}
97
104
You can’t perform that action at this time.
0 commit comments