Class GcpThreadFactory

java.lang.Object
com.google.cloud.grpc.GcpThreadFactory

public final class GcpThreadFactory extends Object
Thread factory helper for grpc-gcp background executors.
  • Field Details

    • USE_DAEMON_THREADS_PROPERTY

      public static final String USE_DAEMON_THREADS_PROPERTY
      System property to control daemon threads for grpc-gcp background executors.
      See Also:
  • Method Details

    • newThreadFactory

      public static ThreadFactory newThreadFactory(String nameFormat)
      Creates a ThreadFactory that names threads and honors the daemon-thread setting.

      Defaults to daemon threads to avoid keeping the JVM alive when only background work remains. Set -Dcom.google.cloud.grpc.use_daemon_threads=false to use non-daemon threads.