dotnet/runtime

[Analyzer] Async methods that don't take a CancellationToken

オープン

#78,397 opened on 2022/11/15

 (7 件のコメント) (11 件のリアクション) (1 人の担当者)C# (5,445 件のフォーク)batch import
api-approvedarea-System.Threading.Taskscode-analyzerhelp wanted

Repository metrics

Stars
 (17,886 個のスター)
PR merge metrics
 (平均マージ 12d 11h) (30d で 661 merged PRs)

説明

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.

コントリビューターガイド