ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/ThreadFactory.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/ThreadFactory.java (file contents):
Revision 1.4 by dl, Sun Aug 31 13:33:14 2003 UTC vs.
Revision 1.5 by dl, Sat Dec 20 15:48:27 2003 UTC

# Line 11 | Line 11 | package java.util.concurrent;
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   */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines