The UI thread in Winforms have the responsibility of running the message pump, by calling Application.Run
. By message pump I mean an endless loop that keeps pulling messages out from the queue.
So now is my question, how can the UI thread also execute a block of code when ex. a click handler is triggered? It should be busy with the message pump, and not able to execute the code?