Skip to content

Conversation

pedrobsaila
Copy link
Contributor

@pedrobsaila pedrobsaila commented Apr 13, 2022

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

@pedrobsaila pedrobsaila requested a review from a team as a code owner April 13, 2022 13:16
@ghost
Copy link

ghost commented Apr 13, 2022

Tagging subscribers to this area: @dotnet/area-extensions-hosting
See info in area-owners.md if you want to be subscribed.

Issue Details

Summary

Describe your changes here.

Fixes dotnet/runtime#58675

Author: pedrobsaila
Assignees: -
Labels:

area-Extensions-Hosting

Milestone: -

@opbld33
Copy link

opbld33 commented Apr 13, 2022

Docs Build status updates of commit ea75037:

✅ Validation status: passed

File Status Preview URL Details
xml/Microsoft.Extensions.Hosting/HostingAbstractionsHostExtensions.xml ✅Succeeded View

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>
Copy link
Contributor

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

Copy link
Contributor Author

@pedrobsaila pedrobsaila Apr 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@maryamariyan maryamariyan left a 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

@maryamariyan maryamariyan merged commit 26ab559 into dotnet:main Apr 26, 2022
@pedrobsaila pedrobsaila deleted the 58675 branch April 26, 2022 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Determine from Host when HostedServices have completed / stopped working
3 participants