code: private void maybeTerminateChannel() {
      if (terminated) {
        return;
      }
      if (shutdown.get() && subchannels.isEmpty() && oobChannels.isEmpty()) {
        channelLogger.log(ChannelLogLevel.INFO, "Terminated");
        channelz.removeRootChannel(this);
        terminated = true;
        terminatedLatch.countDown();
        executorPool.returnObject(executor);
        balancerRpcExecutorHolder.release();
        // Release the transport factory so that it can deallocate any resources.
        transportFactory.close();
      }
    }
docs: Must be run from syncContext