11 |
|
* removes hardwiring of calls to {@link Thread#Thread(Runnable) new Thread}, |
12 |
|
* enabling applications to use special thread subclasses, priorities, etc. |
13 |
|
* |
14 |
+ |
* <p> |
15 |
+ |
* The simplest implementation of this interface is just: |
16 |
+ |
* <pre> |
17 |
+ |
* class SimpleThreadFactory implements ThreadFactory { |
18 |
+ |
* public Thread newThread(Runnable r) { |
19 |
+ |
* return new Thread(r); |
20 |
+ |
* } |
21 |
+ |
* } |
22 |
+ |
* </pre> |
23 |
+ |
* |
24 |
+ |
* The {@link Executors#defaultThreadFactory} method provides a more |
25 |
+ |
* useful simple implementation, that sets the created thread context |
26 |
+ |
* to known values before returning it. |
27 |
|
* @since 1.5 |
28 |
|
* @author Doug Lea |
29 |
|
*/ |