java.util.concurrent
Interface ThreadFactory
- public interface ThreadFactory
An object that creates new threads on demand. Using thread factories
removes hardwiring of calls to new Thread,
enabling applications to use special thread subclasses, priorities, etc.
- Since:
- 1.5
- Author:
- Doug Lea
|
Method Summary |
Thread |
newThread(java.lang.Runnable r)
Constructs a new Thread. |
newThread
public Thread newThread(java.lang.Runnable r)
- Constructs a new Thread. Implementations may also initialize
priority, name, daemon status, ThreadGroup, etc.
- Parameters:
r - a runnable to be executed by new thread instance
- Returns:
- constructed thread