Task.Factory.StartNew with async lambda and Task.WaitAll

Task.Factory.StartNew doesn’t recognise async delegates as there is no overload that accepts a function returning a Task.

This plus other reasons (see StartNew is dangerous) is why you should be using Task.Run here:

tasks.Add(Task.Run(async () => ...

Leave a Comment