© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
18 replies
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();
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?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ ASP.NET Core Persist Task between requests
C#CC# / help
4y ago
Run ASP.NET Core app in Test Container
C#CC# / help
12mo ago
Database In ASP.Net Core
C#CC# / help
14mo ago