-
Notifications
You must be signed in to change notification settings - Fork 1.6k
RunAsync waits for hosted services to stop #7954
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
Conversation
Tagging subscribers to this area: @dotnet/area-extensions-hosting Issue DetailsSummaryDescribe your changes here. Fixes dotnet/runtime#58675
|
Docs Build status updates of commit ea75037: ✅ Validation status: passed
For more details, please refer to the build report. Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report. For any questions, please:
|
@@ -50,7 +50,7 @@ | |||
</Parameters> | |||
<Docs> | |||
<param name="host">The <see cref="T:Microsoft.Extensions.Hosting.IHost" /> to run.</param> | |||
<summary>Runs an application and blocks the calling thread until host shutdown.</summary> | |||
<summary>Runs an application and blocks the calling thread until host shutdown is triggered and all <see cref="T:Microsoft.Extensions.Hosting.IHostedService" /> instances are stopped.</summary> |
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.
The issue you linked is for RunAsync
not Run
. Let's only update the doc over RunAsync
.
Do you have a code repro showing the same holds true for Run
?
cc @eerhardt
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.
Run is just a synchronous wrapper around RunAsync
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.
The issue you linked is for RunAsync not Run. Let's only update the doc over RunAsync.
Do you have a code repro showing the same holds true for Run?
cc @eerhardt
Summary
This change makes explicit the fact that Run/RunAsync waits for all the hosted services to be stopped, before returning.
Fixes dotnet/runtime#58675