dotnet/runtime
Auf GitHub ansehen[Analyzer] Async methods that don't take a CancellationToken
Open
#78.397 geöffnet am 15. Nov. 2022
api-approvedarea-System.Threading.Taskscode-analyzerhelp wanted
Repository-Metriken
- Stars
- (17.886 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 12T 11h) (661 gemergte PRs in 30 T)
Beschreibung
Cancellation is often important to the scalability of an app / service. If an async method has no way to cancel it, that can impact scalability and responsiveness. We should consider adding an analyzer (likely off by default due to noise) that flags async methods (async and/or Task/ValueTask-returning) that have no overloads which accept a CancellationToken, and issue a diagnostic to consider taking one.