1. 复原现象
为了方便讲述先上一段简单的测试代码,来观察一下线程列表中所谓的 lockcount 列。
internal class Program
{
static void Main(string[] args)
{
Console.WriteLine("hello world...");
Debugger.Break();
}
}
接下来用 windbg 附加一下,使用 !threads 命令观察输出。
0:000> !t
ThreadCount: 3
UnstartedThread: 0
BackgroundThread: 2
PendingThread: 0
DeadThread: 0
Hosted Runtime: no
Lock
DBG ID OSID ThreadOBJ State GC Mode GC Alloc Context Domain Count Apt Exception
0 1 14c8 000001A8B862DBB0 2a020 Preemptiv
订阅专栏 解锁全文
862

被折叠的 条评论
为什么被折叠?



