I’m using C# .NET. Its a GUI application. When user clicks a button work is assigned to 4 different background workers. Each take different amount of time and the end result is they populate some variables.
I need to call a method which operates on these end results of each bgwoeker and gives the final output. How to accomplish this?
Problem here is to be sure that all bgworkers are done with their job.
You can make counter and check it from RunWorkerCompleted eventhandler of each BackgroundWorker or check state of other 3 Backgroundworkers from RunWorkerCompleted of each Backgroundworker.