Package org.apache.commons.exec
Class ThreadUtil
java.lang.Object
org.apache.commons.exec.ThreadUtil
Internal thread helper.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) 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.
-
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 prefixdaemon
- marks this thread as a daemon thread- Returns:
- constructed thread, or
null
if the request to create a thread is rejected
-