'Not Responding' Questions

SwissxPiplup

Estimable
Aug 6, 2015
6
0
4,520
I'm curious, when an app stops responding, I understand it means what it says but what does it mean in more detail? And does the computer do something (if so, what?) to rectify this issue when you 'wait for the program to respond' or does it do nothing?
 

Hawkeye22

Distinguished
Moderator
Windows will report "not responding" even if the program is still running. It usually means the UI (user interface) is not available and unable to respond to input.

For example, lets say your program has some big calculation to perform and it may take several minutes to complete. If this is run in the main thread of the program the UI can't respond to input (mouse clicks and such). Normally a large calculation like that should be put in a seperate background thread, not the main thread. This is out of your control as the program must be written to use a seperate thread. In this case, if you were to go into the task manager's process tab, you would see there is still CPU usage still going on.

Hopefully that's not too technical for you, but I'm not sure how else to explain it.

A possible better explanation:
http://www.dotnetblocks.com/post/2010/11/28/Multi-Threaded-Application-vs-Single-Threaded-Application.aspx
 

SwissxPiplup

Estimable
Aug 6, 2015
6
0
4,520


This was perfect, thank you.
 

Hawkeye22

Distinguished
Moderator
No problem. As for the rest of your question which I forgot to answer... And does the computer do something (if so, what?) to rectify this issue when you 'wait for the program to respond' or does it do nothing? .

It depends on what is happening in the program. If that long calculation completes, you will regain control of the program. If that calulation is caught in a loop (calculate PI to the last digit), the program will remain hung indefinately until you kill it with the task manager.