Class ThreadUtils

java.lang.Object
org.jppf.utils.concurrent.ThreadUtils

public class ThreadUtils extends Object
Utility methods for creating, starting and manipulating threads.
Author:
Laurent Cohen
  • Constructor Details

    • ThreadUtils

      public ThreadUtils()
  • Method Details

    • startThread

      public static Thread startThread(Runnable runnable, String name)
      Start a non-daemon thread with the specified Runnable and name.
      Parameters:
      runnable - the runnable executed by the thread.
      name - the name given to the thread.
      Returns:
      the new, started thread.
    • startDaemonThread

      public static Thread startDaemonThread(Runnable runnable, String name)
      Start a daemon thread with the specified Runnable and name.
      Parameters:
      runnable - the runnable executed by the thread.
      name - the name given to the thread.
      Returns:
      the new, started thread.