I have come across two methods of invoking two methods in parallel way that are
Parallel.Invoke(new Action[]())
and
Task.WaitAll(new Task[]())
Can any body help to know what is the difference between them?
I have come across two methods of invoking two methods in parallel way that are
Parallel.Invoke(new Action[]())
and
Task.WaitAll(new Task[]())
Can any body help to know what is the difference between them?
Both the methods internally works on thread pool. There are different opinions which one to use amongst these two, I personally prefer Parallel.Invoke() for running actions parallel and wait for them after finishing.