|1) Technically, the whole point of
await is that it doesn't "block". It simply creates a continuation callback representing the rest of the method, and passes that to the task being awaited.
However, from a logical perspective, the rest of the method is "blocked" until the task returned from
GetItemChildAsync completes. That happens when the task is awaited, so it "blocks" on the first item.
If you wanted to start all of the tasks at the same time, and then wait for them all to complete, you would use the
IEnumerable<Task> tasks = items.Select(i => GetItemChildAsync(i.Id));
2) None whatsoever. The
HttpClient class[^] is safe to call from multiple threads at the same time. In fact, a singleton used to be the recommended way to use this class[^]. However, the current recommendation is to use the
IHttpClientFactory service[^] to create an
HttpClient instance on demand.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."