WebHostExtensions.WaitForShutdownAsync(IWebHost, CancellationToken) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a Task that completes when shutdown is triggered via the given token, Ctrl+C or SIGTERM.
public static System.Threading.Tasks.Task WaitForShutdownAsync (this Microsoft.AspNetCore.Hosting.IWebHost host, System.Threading.CancellationToken token = default);
static member WaitForShutdownAsync : Microsoft.AspNetCore.Hosting.IWebHost * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function WaitForShutdownAsync (host As IWebHost, Optional token As CancellationToken = Nothing) As Task
Parameters
- token
- CancellationToken
The token to trigger shutdown.
Returns
A Task that completes when shutdown is triggered via Ctrl+C or SIGTERM.