-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Add a true way to execute background job after end of request #18409
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
base: main
Are you sure you want to change the base?
Conversation
|
I'm not sure this is the right approach. It adds even more load to the We should probably avoid adding more responsibilities to ShellScope, especially since it's already a performance-critical component and currently burdened with too many fields. |
| { | ||
| // Decrement the active jobs count when the job is disposed. | ||
| Interlocked.Decrement(ref _activeJobsCount); | ||
| }, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving this to individual calls at each return point isn't necessary. Keep in mind that this operates within a separate scope, which gets disposed after the inner scope that performs the actual work. It's safe to decrement the count during the disposal of the outer scope.
We'll discuss during triage. If we elect to not proceed with adding the background into the ShellScope, we should at least take the renaming of the background job method name. |
|
This pull request has merge conflicts. Please resolve those before requesting a review. |
|
It seems that this pull request didn't really move for quite a while. Is this something you'd like to revisit any time soon or should we close? Please comment if you'd like to pick it up. |
No description provided.