How to monitor if a Thread completed?
Posted on 2010-08-26
I hope someone has a good answer to this question.
I have an application that grabs some data and shows a report. The process of comping the report takes about 20 minutes and I want the user to be able to click a Cancel command to stop this.
I want to use the .NET 4.0 Cancellation Token. My main problem is not cancelling the thread that is fetching the data, but once the thread actually completes and updates the dataset with all the informatin. How do I let the application know that the first thread completed? What is the best practice to do this? Keeping in mind that my application needs to remain responsive for the user.
If anyone has some experience with this type of a setup, I would welcome your input.