Background thread vs UI thread

Can someone help me figure out the background thread and UI thread in C #. I searched for it, but I can not find an article illustrating both.

+6
multithreading c #
source share
3 answers

The user interface creates user interface elements and waits and responds to events such as mouse clicks and keystrokes. You can only access user interface elements from the user interface stream.

There are two types of streams: background and foreground. The user interface thread is an example of a front thread.

The difference between background and front threads is quite simple. Background threads do not stop the process from completing, but do foreground threads. When the last foreground thread stops, all background threads also stop and the process ends.

+12
source share

This website has a lot of information on streaming and parallel programming: http://www.albahari.com/threading/

Good luck.

+6
source share

There is another key issue to keep in mind. There is one UI thread, and you can only call methods on the UI of the objects in that thread. In another thread, you need to call Control.Invoke () to switch to the UI if you are doing something like updating the status bar.

+1
source share

All Articles