Usage of TPL vs Parallel.ForEach() on file processing
As seen with @t3chb0t and @dfhwze I have been misusing the TPL. I also don't see any point on .ConfigureAwait(false) a Task.WhenAll() call, also with the async all-the-way rule, using an awaitable task for this case would have me to convert many of my APIs to async one.

So they provided me these solutions :


Modifiy my task creation logic this way :  tasks.AddRange(filesPath.Select(async d2PFilePath =&gt; await Task.Run(() =&gt; UnpackD2PFile(d2PFilePath)))); and removing the Task.Delay(10); on my UnpackD2PFile(string path) task
Use the Parallel.Foreach() loop to let the framework create and handle the concurrency and also allow me to keep a synchronous API


Both of these solutions completed the work in the same time, and provided this output :



As you can see now the behavior is quite different than before, not every task start at the same moment, also now there is a delay before every progress bars shown up. But we gained almost 2sec on the total execution time :)

I highly recommend to use the Parallel approach as it is the easiest one to implement.