When I open my form, I fire a number of backgroundworkers to load form data.
If a user tries to close the form too soon while workers are running, it throws an exception (obviously)
My question is : what is the best practice to safely cancel running async operations when a form is closed.
I'd appreciate if someone could point me to some sample code. Thanks.
If a user tries to close the form too soon while workers are running, it throws an exception (obviously)
My question is : what is the best practice to safely cancel running async operations when a form is closed.
I'd appreciate if someone could point me to some sample code. Thanks.