-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Add IHostedLifecycleService #87335
Add IHostedLifecycleService #87335
Conversation
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
Tagging subscribers to this area: @dotnet/area-extensions-hosting Issue DetailsWIP
|
src/libraries/Microsoft.Extensions.Hosting/src/Internal/Host.cs
Outdated
Show resolved
Hide resolved
0d65836
to
ab0ffee
Compare
commit d0e9189a6fe21b3e604dc3188a804d0cb252125d Author: Steve Harter <steveharter@users.noreply.github.com> Date: Fri Jun 9 13:20:30 2023 -0500 sync commit a5e88d58c15be5f3fe63e4d3f994448054ca8dbe Merge: 8010ffa392c 9b7db0f Author: Steve Harter <steveharter@users.noreply.github.com> Date: Fri Jun 9 10:59:47 2023 -0500 Merge branch 'main' of https://github.com/steveharter/runtime into Startup commit 8010ffa392cc10ceb96ed84c7a1c571a7dc47aac Author: Steve Harter <steveharter@users.noreply.github.com> Date: Fri May 19 10:39:31 2023 -0500 Add IServiceStartup to enable pre-startup hooks
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.
cool 😎
ServicesStartConcurrently and ServicesStopConcurrently should apply uniformly across events. Anything else is going to be extremely confusing. Especially since nobody even asked for ServicesStartConcurrently. |
That was the way it was prototyped originally, but later some of the scenarios were concurrent async validation - e.g. multiple validators (e.g. verifying certificates, endpoints, etc) or warm-up operations that are not related to each other which ideally run concurrently so the startup finishes sooner. The default for ServicesStartConcurrently is If we go with ServicesStartConcurrently\ServicesStopConcurrently for the new events I suppose we could add knobs later (e.g. StartingIsConcurrent) to enable that per-event to enable that per event if necessary (instead of adding knobs later that would have the opposite defaults of ServicesStartConcurrently\ServicesStopConcurrently). So I'm inclined now to change that behavior as suggested to help avoid confusion. |
src/libraries/Microsoft.Extensions.Hosting/src/Internal/Host.cs
Outdated
Show resolved
Hide resolved
/azp run runtime-libraries-coreclr outerloop-windows |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
LGTM
Issues created for the long-running test failures (unrelated to this PR). |
Fixes #86511
Please see the "design notes" section in the linked issue above. Summary: