-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
api-suggestionEarly API idea and discussion, it is NOT ready for implementationEarly API idea and discussion, it is NOT ready for implementationarea-System.Threading.Tasks
Milestone
Description
The WithCancellation extension method is super-useful. Should we add it to the .NET Framework / .NET Standard itself?
The risk is that folks will misunderstand the subtle yet important difference between using this method and passing the CancellationToken into the original async method properly.
Preferably this is not an extension method so it doesn't conflict with extension methods that folks have already defined. It should just override them, assuming the semantics are equivalent (the type of exception thrown, etc.)
See also the source code for its definition in the vs-threading library.
As discussed in davidfowl/AspNetCoreDiagnosticScenarios#8 with @davidfowl.
danielchalmers, GSPP, cremor, pentp, NN--- and 2 moreEli-Black-Workslang25, GSPP and anarsen
Metadata
Metadata
Assignees
Labels
api-suggestionEarly API idea and discussion, it is NOT ready for implementationEarly API idea and discussion, it is NOT ready for implementationarea-System.Threading.Tasks