Browse Source

Merge pull request #1026 from DavidKarlas/cacheThreadInfo

[Mono.Debugger.Soft] Adding caching of ThreadInfo in ThreadMirror
Jeffrey Stedfast 11 năm trước cách đây
mục cha
commit
9fe7e76b3d

+ 3 - 2
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs

@@ -7,6 +7,7 @@ namespace Mono.Debugger.Soft
 	public class ThreadMirror : ObjectMirror
 	{
 		string name;
+		ThreadInfo info;
 
 		internal ThreadMirror (VirtualMachine vm, long id) : base (vm, id) {
 		}
@@ -53,8 +54,8 @@ namespace Mono.Debugger.Soft
 
 		public bool IsThreadPoolThread {
 			get {
-				ThreadInfo info = vm.conn.Thread_GetInfo (id);
-
+				if (info == null)
+					info = vm.conn.Thread_GetInfo (id);
 				return info.is_thread_pool;
 			}
 		}