HostingAbstractionsHostExtensions.WaitForShutdown(IHost) Method

Definition

Blocks the calling thread until shutdown is triggered via Ctrl+C or SIGTERM.

C#
public static void WaitForShutdown(this Microsoft.Extensions.Hosting.IHost host);

Parameters

host
IHost

The running IHost.

Applies to

Produkt Versiounen
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided), 2.1 (package-provided)