ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/ThreadFactory.java
Revision: 1.2
Committed: Tue May 27 18:14:40 2003 UTC (21 years ago) by dl
Branch: MAIN
CVS Tags: JSR166_PRELIMINARY_TEST_RELEASE_1, JSR166_PRERELEASE_0_1
Changes since 1.1: +3 -1 lines
Log Message:
re-check-in initial implementations

File Contents

# Content
1 /*
2 * Written by Doug Lea with assistance from members of JCP JSR-166
3 * Expert Group and released to the public domain. Use, modify, and
4 * redistribute this code in any way without acknowledgement.
5 */
6
7 package java.util.concurrent;
8
9 /**
10 * An object that creates new threads on demand. Using thread factories
11 * removes hardwiring of calls to {@link Thread#Thread(Runnable) new Thread},
12 * enabling applications to use special thread subclasses, priorities, etc.
13 *
14 * @since 1.5
15 *
16 * @spec JSR-166
17 * @revised $Date: 2003/02/26 10:48:09 $
18 * @editor $Author: jozart $
19 */
20 public interface ThreadFactory {
21
22 /**
23 * Constructs a new <tt>Thread</tt>. Implementations may also initialize
24 * priority, name, daemon status, <tt>ThreadGroup</tt>, etc.
25 *
26 * @param r a runnable to be executed by new thread instance
27 * @return constructed thread
28 */
29 Thread newThread(Runnable r);
30 }