Why does Task Manager force-close applications more effectively (Windows 10)?

778 views

When an application isn’t responding, the obvious response is to attempt to close it with the red “X” in the top right corner of the application window, but often if the app is frozen or otherwise unresponsive, that button is likewise unresponsive and accomplishes nothing. At this point, you might try to right click on the app icon in the taskbar and select “Close Window”, which (in my experience) seems to work more often than the red X does. However, sometimes neither of those solutions does anything at all and the only option left is to open Task Manager and instruct Task Manager to shut down the process, which typically works immediately. So why the hell doesn’t Windows just run whatever script is executed by Task Manager when I press the red X or select “Close Window”? Why are there three seemingly unique approaches to ending a process with varying levels of success when the developers of Windows are clearly fully capable of designing one which works in all cases?

In: Technology

12 Answers

Anonymous 0 Comments

Normally a Windows application runs in an “event loop”, processing messages. Messages are things like “The user moved the mouse”, “The user pressed the ‘a’ key”, “The user clicked the close window button”, etc.

Sometimes applications stop processing those messages and if that happens, they don’t react to the X button. This is why the task manager can dispense with the niceties of telling the application it should exit, and just kill it outright.

And the reason why the X button works differently because you normally want to let the application a chance to react, and ask “Are you sure you don’t want to save the last 6 hours of work?”. Killing it just stops it immediately, and as a result it won’t get a chance to do anything of the sort, even if it’s working perfectly fine.

You are viewing 1 out of 12 answers, click here to view all answers.