Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Thread survive App termination?

If a .NET program creates and starts a System.Threading.ThreadPool thread, and then the program ends (either naturally or by crashing):

  • Is it possible for the Thread to survive and carry on processing on its own?
  • Is it possible that an App will look like it has terminated due to the main UI thread having ended, but for a background thread to carry on running invisibly?
like image 844
CJ7 Avatar asked Oct 06 '22 01:10

CJ7


1 Answers

No. By definition, if one of the threads of the process is still working, then it has not actually ended.

like image 111
hmakholm left over Monica Avatar answered Oct 10 '22 04:10

hmakholm left over Monica