internal virtual async Task shutdownAsync() { if (!closing) { closing = true; try { await this.group.ShutdownGracefullyAsync(); if (ThreadDeathWatcher.AwaitInactivity(TimeSpan.FromSeconds(2))) { log.Debug("Global event executor finished shutting down."); } else { log.Debug("Global event executor failed to shut down."); } } catch (Exception e) { log.Error("Netty shutdown error", e); } FastThreadLocal.Destroy(); } else { log.Debug("Pool already shutting down"); } }
public void GlobalCleanup() => FastThreadLocal.Destroy();