E
elziko
I know I can stop my thread by using the CancelAsync method of the
BackgroundWorker but that requires me to monitor the value of the
CancellationPending property in my BackgroundWorker.DoWork event.
This means that if the DoWork event is processing a single line of code then
my code must wait for this line to finish before it can check the value of
CancellationPending.
What if the user wants to cancel before I can check this value? Is there any
way to outright kill the thread, immediately without monitoring any
properties within DoWork?
TIA
BackgroundWorker but that requires me to monitor the value of the
CancellationPending property in my BackgroundWorker.DoWork event.
This means that if the DoWork event is processing a single line of code then
my code must wait for this line to finish before it can check the value of
CancellationPending.
What if the user wants to cancel before I can check this value? Is there any
way to outright kill the thread, immediately without monitoring any
properties within DoWork?
TIA