Package com.illumon.util.thread
Class ThreadUtils
java.lang.Object
com.illumon.util.thread.ThreadUtils
Collection of thread related utility methods.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Thread
Create a thread and make it a daemon.static Thread
newDaemonThread
(Runnable r, String name) Create a thread, name it, and make it a daemon.static Thread
startDaemonThread
(Runnable target, String name) Create a named daemon thread and start it.
-
Constructor Details
-
ThreadUtils
public ThreadUtils()
-
-
Method Details
-
newDaemonThread
Create a thread and make it a daemon.- Parameters:
r
- the runnable to pass the new Thread- Returns:
- the created thread
-
newDaemonThread
Create a thread, name it, and make it a daemon.- Parameters:
r
- the runnable to pass the new Threadname
- the name of the thread- Returns:
- the created thread
-
startDaemonThread
Create a named daemon thread and start it.- Parameters:
target
- the runnable to pass the new Threadname
- the name of the thread- Returns:
- the created thread, started
-