Reputation: 856
I have a WPF application with threads. How do I abort all threads when closing the application?
Upvotes: 1
Views: 1029
Reputation: 46034
After you create the thread, set the IsBackground
property to true
.
Thread th = new Thread(new ThreadStart(Start));
th.IsBackground = true;
th.Start();
Upvotes: 4