Execute multiple sync operations at once
Hi!
I have been trying to follow the example here
http://msdn.microsoft.com/en-us/library/hh696703.aspx
but is not exactly as I want to do, the biggest difference is that they have a fixed set of tasks, and that they wait for them all to execute before updating anything. They also call async methods, we have some heavy duty calculation methods that have to be called without "await".
Our application has a list of items in a gridview. When the user press a button, I want to kick off a method with some input values that does work for each of these items. I want the work to be executed in parallell, so one single press of a button will cause work to start for each of these items. Basically, the "worker" method is something like
1) Show a small spinning icon on the row
2) Call another heavy method with lots of calculation, can take up to 1 minute to finish
3) Show an icon on the row indicating the process was ok OR show a red cross icon that indicate the operation failed.
I have played with the Parallell framework, but am not sure exactly how to proceed. We are currently using framework 4.0 but plan to move to 4.5 within 2 months or so.
Anyone has suggestions on how to proceed, what classes that might be useful here? I prefer to work with the Task objects... and learn more about them and how to execute them in parallell.
We also use windows forms.
regards
S