大约 30 分钟后,我的 WPF 应用程序使用了高 CPU 使用率,然后我中断了应用程序以找出哪些代码使用了高 CPU 使用率,但我什么也没得到。
Visual Studio 2008 无法显示当前正在运行的代码,但我在“调用堆栈”面板中找到了这个:
[在睡眠中,等待,或加入] mscorlib.dll!System.Threading.WaitHandle.WaitAny(System.Threading.WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext) + 0x8f 字节 System.dll!System.Net.TimerThread.ThreadProc() + 0x2f9 字节 mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(对象状态)+ 0x66 字节 mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback 回调, 对象状态) + 0x6f 字节 mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() + 0x44 字节
这是什么?CPU使用率高有什么问题?以及如何降低 CPU 使用率?