Thanks Alexander, that's exactly what I was suspecting.
Parallel.ForEach() may not necessarily be using different threads to
execute the tasks. Also, the latest stuff that can be implemented with
async/await levers high parallelism without the need of multithreading.
Only I'm afraid you have to
Hello Husain,
I think the observed behavior lies in the implementation of
Parallel.ForEach. All your assumptions seem correct to me except that
Parallel.ForEach does not execute its actions on a separate thread or
separate task each.
If you look at mscorlib with ILSpy and find
System.Threading.Ta