Source: Al0106AvoidTaskRunInAspNetCoreAnalyzer.csDocumentation Index
Fetch the complete documentation index at: https://ancplua.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Description
ASP.NET Core request handlers already execute on the thread pool. UsingTask.Run() adds unnecessary overhead by scheduling work to another thread pool thread.
Bad Code
Good Code
Properties
- Category: ASP.NET Core
- Severity: Warning
- Enabled by default: True
- Code fix available: False
