How is access to the UI thread handled in C#?
why is the UI thread treated differently from other threads?
thank you guys for your help
really appreciate it !
How is access to the UI thread handled in C#?
why is the UI thread treated differently from other threads?
thank you guys for your help
really appreciate it !
The UI thread contains the Windows Message Pump. This makes it critical to keep this thread from being blocked by long running operations.
Typically, that means pushing anything long running onto a separate thread, and then using Control.Invoke/BeginInvoke (Windows Forms) or Dispatcher.Invoke/BeginInvoke (WPF) to pass delegates from other threads in order to update the UI.