Class ThreadUtil

java.lang.Object
org.apache.commons.exec.ThreadUtil

final class ThreadUtil extends Object
Internal thread helper.
  • Constructor Details

    • ThreadUtil

      ThreadUtil()
  • Method Details

    • newThread

      static Thread newThread(ThreadFactory threadFactory, Runnable runnable, String prefix, boolean daemon)
      Creates a new Thread from the given factory and prefixes it's name with a prefix and sets the daemon flag.
      Parameters:
      threadFactory - the thread factory.
      runnable - The runnable to thread.
      prefix - the thread name prefix
      daemon - marks this thread as a daemon thread
      Returns:
      constructed thread, or null if the request to create a thread is rejected