Skip to content

[REQ] Add CancellationToken to list of arguments in Controller methods #14325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
philkild opened this issue Dec 26, 2022 · 0 comments · Fixed by #14326
Closed

[REQ] Add CancellationToken to list of arguments in Controller methods #14325

philkild opened this issue Dec 26, 2022 · 0 comments · Fixed by #14326

Comments

@philkild
Copy link
Contributor

Is your feature request related to a problem? Please describe.

I have a number of long-running server-side operations and handling cancellation from clients would be extremely useful. The ModelBinder will automatically bind RequestAborted to the cancellation token, therefore adding it as an argument is all that is required.

Describe the solution you'd like

Add a CancellationToken argument to all async calls.

Describe alternatives you've considered

I've tried to minimise long running calls and add caching but this would be a massive help.

Additional context

I found the following Blog post helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant