I would define UI thread is the thread where
Application.Run
is called. This is different from the definition of Solution 1, which is
almost correct.
I can explain the difference. It is possible to have two (or more) different threads, and run different UI on different thread. Those UI will execute in different threads and unrelated to each other. Communication between those thread would require
Invoke
or
BeginInvoke
(the method of
System.Windows.Forms.Control
or
Dispatcher
). This scenario is really exotic and rarely used (for those who may not believe me: yes, I tried it! you can try it, too). Usually, the UI thread is the same thread as the thread initially created, where the
entry-point is executed. So, typically, the UI thread is the same as entry-point thread. But this is not the law, you could make those threads different.
Strictly speaking, there is no the "official" term for "UI thread". I just pointed out that the entry-point thread and UI thread can be different. (By the way, in WPF, two threads are working for UI. Things are a bit more complex than many think.)
Now, how about all other threads. No, they don't have to be "background threads" (so the Solution 1 is totally incorrect here), they are just some extra threads. Why? Because this term has a very specific meaning in .NET: this is the thread with the property
System.Threading.Thread.IsBackground
assigned to true. What is does? Background thread don't hold the process when the main thread is terminated, as the "usual" thread does. Please see:
http://msdn.microsoft.com/en-us/library/system.threading.thread.isbackground%28v=vs.110%29.aspx[
^].
—SA