开发者

What makes a process appear as Not responding in Windows?

开发者 https://www.devze.com 2022-12-10 06:37 出处:网络
What is it exactly that \"triggers\" Windows to mark a process as Not responding in the Task Manager and Resource开发者_C百科 Monitor?The API behind this is IsHungAppWindow.Basically, if the applicati

What is it exactly that "triggers" Windows to mark a process as Not responding in the Task Manager and Resource开发者_C百科 Monitor?


The API behind this is IsHungAppWindow. Basically, if the application has not pumped a message within 5 seconds it can be marked as not responding.


If a process does not collect Windows messages from its queue using the GetMessage function or something related, it will be tagged as "not responding" -- because it is not responding to user interface events.

This does not necessarily mean that the application is actually hung -- it may just be too busy to pay attention to the user.


Basically, it get's it self into a state where the program does not return to a point where it can process it's message queue.

Usually, this is either a loop that doesn't end or a blocking operation, such as reading from a socket, etc.


The fact that they don't empty their message queue, by polling it GetMessge API and the like.

0

精彩评论

暂无评论...
验证码 换一张
取 消