Task.WaitAll Method (Task, TimeSpan)
Waits for all of the provided cancellable Task objects to complete execution within a specified time interval.
Assemblies: System.Threading.Tasks (in System.Threading.Tasks.dll)
mscorlib (in mscorlib.dll)
One or more of the Task objects in tasks has been disposed.
The tasks argument is null.
An exception was thrown during the execution of at least one of the Task instances.
timeout is a negative number other than -1 milliseconds, which represents an infinite time-out.
timeout is greater than MaxValue.
The tasks argument contains a null element.