public async IAsyncEnumerable<HttpResponseMessage> SendTwelveRequestsAtATimeAsync(IAsyncEnumerable<HttpRequestMessage> requests)
{
HttpClient client = new();
List<HttpRequestMessage> requestsBatch = [];
await foreach (var req in requests)
{
if (requestsBatch.Count < 12)
{
requestsBatch.Add(req);
}
else
{
foreach (var res in await Task.WhenAll(requestsBatch.Select(client.SendAsync)))
{
yield return res;
}
requestsBatch = [];
}
}
}
>It means the decline you would normally expect in one year would take four years after treatment, giving patients decades of "good quality life", Prof Sarah Tabrizi told BBC News.
>The first symptoms of Huntington's disease tend to appear in your 30s or 40s and is normally fatal within two decades – opening the possibility that earlier treatment could prevent symptoms from ever emerging.