Foreground Thread
So the application won't wait until the background threads are completed, but it will wait until all the foreground threads are terminated.
By default, the threads are foreground threads. So when we create a thread the default value of IsBackground property would be false.
Background Thread
We can create a background thread like following:
- Thread backgroundThread = new Thread(threadStart);
- backgroundThread.IsBackground = true;
- backgroundThread.Start();
No comments:
Post a Comment