ShutdownChannelsAsync() public static method

Requests shutdown of all channels created by the current process.
public static ShutdownChannelsAsync ( ) : Task
return Task
示例#1
0
 /// <summary>
 /// Handler for AppDomain.DomainUnload, AppDomain.ProcessExit and AssemblyLoadContext.Unloading hooks.
 /// </summary>
 private static void HandleShutdown()
 {
     GrpcEnvironment.ShutdownChannelsAsync().Wait();
 }
示例#2
0
 /// <summary>
 /// Handler for AppDomain.DomainUnload, AppDomain.ProcessExit and AssemblyLoadContext.Unloading hooks.
 /// </summary>
 private static void HandleShutdown()
 {
     Task.WaitAll(GrpcEnvironment.ShutdownChannelsAsync(), GrpcEnvironment.KillServersAsync());
 }
示例#3
0
 /// <summary>
 /// Handler for AppDomain.DomainUnload and AppDomain.ProcessExit hooks.
 /// </summary>
 private static void ShutdownHookHandler(object sender, EventArgs e)
 {
     Task.WaitAll(GrpcEnvironment.ShutdownChannelsAsync(), GrpcEnvironment.KillServersAsync());
 }