Windows applications interact with the operating system to receive Windows messages. These messages are processed by the application in it by the main thread in the loop.
If the application cannot process its messages on time (a few seconds is the field), the message queue is filled, and windows mark this application as "not responding", making it the main window white and such.
This behavior is mainly caused by a lengthy operation in the same thread that processes Windows messages. This thread is often referred to as the "main user interface thread." If you are not doing explicit multithreading, this may be the only thread in your application.
source share