I'm using 32 tasks in one thread to manage a big datatable (I'm splitting it in 32 parts). I'm launching my tasks like this :
var task1 = Task.Factory.StartNew(() => MyFunction(args));
var task2 = Task.Factory.StartNew(() => MyFunction(args));
...
Task.WaitAll(task1, task2, ...);
I want to display the user how many do he have to wait. Each time a task is over I want to increment a value to display something like : "Wait (1/32)", then "Wait(2/32)" ... etc
How can I check when a task is complete with my code ? Thanks.