I'm new to Stack Overflow. Looked up many things here but signed up today. Just started a multi-threading course.
I'm having trouble understanding when to use foreground and background threads. I am a bit new to threading. What is the advantages and disadvantages between them? When I set the property what should I be think about?
To me it seems quite convenient to use background since it means I don't have to handle the thread during closing the application, right? My teacher told me that most of the time foreground threads are used but didn't explain as to why in a way that I understand at least.
Can I get any good examples as to when one would use foreground threads and when to use background threads?
I see that C# standard library sets threads created by the Thread class constructor to foreground by default. While ThreadPool is by default background. What is the reasoning for this? Why did they write the library this way? (I know the property can be changed, I just like to know why they are this way by default).