I am running some background threads in a GUI. Currently, I am implementing a personal theme cancellation code, but there is an IsBackground property in streams, and according to MSDN they cancel themselves.
I know that it will be Thread.Abort (), which is unpleasant, but nothing happens in this background thread, I need to maintain the correct state or require the correct cleanup.
I try to avoid any crashes if the user simply closes the application in the middle of the background thread. Since multi-threaded scripts are quite difficult to verify, I would like to get your opinion on this.
Basically, instead of rolling my own code, should I just set IsBackground = True and forget about the rest?
source
share