Created
August 10, 2020 20:26
-
-
Save johnmmoss/aff1d9e84846ce9046dfecc41c9c3139 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tasks = new List<Task<ResponseDto>>(); | |
foreach (var survey in filteredSurveys) | |
{ | |
var task = Task.Run(() => GetResponses(survey)); | |
tasks.Add(task); | |
} | |
Task.WaitAll(tasks.ToArray()); | |
return tasks.Select(x => x.Result).ToList(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment