C#C
C#3y ago
kocha

✅ Why do my ASP.NET Core Requests not run in parallel?

var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
app.MapGet("/slow", async () => await Task.Delay(5000));
app.Run();


If I call the /slow enpoints multiple times in short succession, I can see that they are not processed in parallel. I can see that because they take longer than 5 seconds (except first one). This is confusing to me, as I would expect them to await the delay in parallel. Can someone explain why this is?
Was this page helpful?