Thread.IsBackground
-
Can anyone explain me the
Thread.IsBackground
property! When to use? Why use? And what does MS mean with: A thread is either a background thread or a foreground thread. Background threads are identical to foreground threads, except that background threads do not prevent a process from terminating. Once all foreground threads belonging to a process have terminated, the common language runtime ends the process by invoking Abort on any background threads that are still alive. Daniel ;) --------------------------- Never change a running system! -
Can anyone explain me the
Thread.IsBackground
property! When to use? Why use? And what does MS mean with: A thread is either a background thread or a foreground thread. Background threads are identical to foreground threads, except that background threads do not prevent a process from terminating. Once all foreground threads belonging to a process have terminated, the common language runtime ends the process by invoking Abort on any background threads that are still alive. Daniel ;) --------------------------- Never change a running system!As long as a foreground tread is running your app is running. If you create a Windows app that launches a forground thread and you close the app window without stopping the extra foreground thread you app will still be running. If you create a background thread instead then the background thread will be terminated automatically when you close the app window. I hope this was clear.