Skip to content

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

@stephentoub

Description

@stephentoub

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.

Metadata

Metadata

Labels

api-approvedAPI was approved in API review, it can be implementedarea-System.Threading.Taskscode-analyzerMarks an issue that suggests a Roslyn analyzerhelp wanted[up-for-grabs] Good issue for external contributors

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions