After Task.IsCompleted what is better: await or Result [duplicate]
问题 This question already has answers here : Await on a completed task same as task.Result? (2 answers) Is there a difference between calling .Result or await on known completed tasks? [duplicate] (1 answer) Closed 2 months ago . I'm working in a simple timeout code for my http requests. I got this private async Task<HttpResponseMessage> ExecuteIOTask(Task<HttpResponseMessage> ioTask, int timeout) { var timeoutTask = await Task.WhenAny(Task.Delay(timeout), ioTask); if (ioTask.IsCompleted) return