Replies: 1 comment 3 replies
-
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I know that there is
IHostedService
that can be used for implementing background tasks by adding it in Startup with.AddHostedService
.However, there seems to be very little about how to create a background service on demand during runtime, after startup.
For example, after an MVC API application is started up, when it receives a specific request, I want to have a background service to be created for that request to do some background tasks and not blocking the the controller thread.
That way, the API will return something like
202 Accepted
immediately and then the background job will handle the request.Is there such feature? And are there any documentation about it?
FYI, I am using .NET Core 3.1
Beta Was this translation helpful? Give feedback.
All reactions