According to MSDN Task.WaitAll throughs the AggregateException as soon as an exception was thrown during the execution of at least one of the Task instances. I need wait for all the tasks are finished handling each thrown exception. So do I need make something like:
while (true)
{
try
{
Task.WaitAll(tasks);
break; //only if no exception is occured
}
catch (AggregateException aex)
{
//exceptions handling...
}
}
or is some more rational way?