As someone else pointed out, make sure all your background threads are
marked as background. When the appdomain is exiting the runtime goes to
great lengths to unwind all threads and terminate. One thing to watch for
are threads that are blocked in unmanaged code - the runtime has no easy way
of forcing them to terminate.
Other then that there is no quick way to terminate all the threads.
"muscha" <mu****@no.spam.net> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi,
I spawns a number of background threads while creating a windows forms
application. I noticed that when I quit the application or calling
Application.Exit, it hasn't really stop. Is there a quick way to say
"terminate all threads and quit"?
thanks,
/m