Starting multiple async/await functions at once and handling them separately
问题 How do you start multiple HttpClient.GetAsync() requests at once, and handle them each as soon as their respective responses come back? First what I tried is: var response1 = await client.GetAsync("http://example.com/"); var response2 = await client.GetAsync("http://stackoverflow.com/"); HandleExample(response1); HandleStackoverflow(response2); But of course it's still sequential. So then I tried starting them both at once: var task1 = client.GetAsync("http://example.com/"); var task2 =