public static Thread newThread(String name, Runnable runnable, boolean daemon) {
    Thread thread = new Thread(runnable, name);
    thread.setDaemon(daemon);
    thread.setUncaughtExceptionHandler((t, e) -> {
      logger.error("Encountered throwable in {}", t, e);
    });
    return thread;
  }
Create a new thread

@param name The name of the thread
@param runnable The work for the thread to do
@param daemon Should the thread block JVM shutdown?
@return The unstarted thread
ambry-utils/src/main/java/com/github/ambry/utils/Utils.java