Package org.jppf.utils.concurrent
Class ThreadUtils
java.lang.Object
org.jppf.utils.concurrent.ThreadUtils
Utility methods for creating, starting and manipulating threads.
- Author:
- Laurent Cohen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ThreadstartDaemonThread(Runnable runnable, String name) Start a daemon thread with the specifiedRunnableand name.static ThreadstartThread(Runnable runnable, String name) Start a non-daemon thread with the specifiedRunnableand name.
-
Constructor Details
-
ThreadUtils
public ThreadUtils()
-
-
Method Details
-
startThread
Start a non-daemon thread with the specifiedRunnableand name.- Parameters:
runnable- the runnable executed by the thread.name- the name given to the thread.- Returns:
- the new, started thread.
-
startDaemonThread
Start a daemon thread with the specifiedRunnableand name.- Parameters:
runnable- the runnable executed by the thread.name- the name given to the thread.- Returns:
- the new, started thread.
-