I have a question.
One day i have been working with threads. Thread had 'while' loop that
checked locked value telling the thread when application was closing
( in Dispose method i set locked object's value to 'true'). If i
didn't have the locked object the thread was present in taskmanager
even when application has been already gone.
My question is:
Having while loop in background worker i don't have to care about
closing conditions.
Even if i have while(true) and i close the application, the thread is
closed. Don't know why and when. Completed event is not raised - but
it normally it is during an exception for example.
Why is it so?
Thanks and regards
PK