|
1
beginner
0
intermediate
0
advanced
|
|||
|
||||
|
They are identical except a background thread does not keep the application alive while a foreground thread would keep the application alive as long as it is running. Once all foreground threads have stopped, the application stops running (even if some background threads are still running) and stops any background threads before shutting down. By default any thread created explicitly (e.g using Thread.Start) is a Foreground thread. Threads in thread pool are background threads. You can check if the thread is background by calling the Thread.IsBackground property A foreground thread can be changed to a background thread any time by setting its IsBackground property to true. |
|||
|
||||