Is there a way in the new async dotnet 4.5 library to set a timeout on the Task.WhenAll method? I want to fetch several sources, and stop after say 5 seconds, and skip the sources that weren’t finished.
Is there a way in the new async dotnet 4.5 library to set a
Share
You could combine the resulting
Taskwith aTask.Delay()usingTask.WhenAny():If you want to harvest completed tasks in case of a timeout: