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

Comparing jsr166/src/main/java/util/concurrent/Executors.java (file contents):
Revision 1.56 by dl, Thu May 26 12:07:14 2005 UTC vs.
Revision 1.57 by dl, Sun May 29 14:03:24 2005 UTC

# Line 41 | Line 41 | public class Executors {
41  
42      /**
43       * Creates a thread pool that reuses a fixed set of threads
44 <     * operating off a shared unbounded queue. If any thread
45 <     * terminates due to a failure during execution prior to shutdown,
46 <     * a new one will take its place if needed to execute subsequent
47 <     * tasks.
44 >     * operating off a shared unbounded queue. At any point, at most
45 >     * <tt>nThreads</tt> threads will be active processing tasks. If
46 >     * additional tasks are submitted when all threads are active,
47 >     * they will wait in the queue until a thread is available.  If
48 >     * any thread terminates due to a failure during execution prior
49 >     * to shutdown, a new one will take its place if needed to execute
50 >     * subsequent tasks.
51       *
52       * @param nThreads the number of threads in the pool
53       * @return the newly created thread pool
# Line 58 | Line 61 | public class Executors {
61      /**
62       * Creates a thread pool that reuses a fixed set of threads
63       * operating off a shared unbounded queue, using the provided
64 <     * ThreadFactory to create new threads when needed.
64 >     * ThreadFactory to create new threads when needed.  At any point,
65 >     * at most <tt>nThreads</tt> threads will be active processing
66 >     * tasks. If additional tasks are submitted when all threads are
67 >     * active, they will wait in the queue until a thread is
68 >     * available. If any thread terminates due to a failure during
69 >     * execution prior to shutdown, a new one will take its place if
70 >     * needed to execute subsequent tasks.
71       *
72       * @param nThreads the number of threads in the pool
73       * @param threadFactory the factory to use when creating new threads
# Line 95 | Line 104 | public class Executors {
104       * Creates an Executor that uses a single worker thread operating
105       * off an unbounded queue, and uses the provided ThreadFactory to
106       * create a new thread when needed. Unlike the otherwise
107 <     * equivalent <tt>newFixedThreadPool(1, threadFactory)</tt> the returned executor
108 <     * is guaranteed not to be reconfigurable to use additional
109 <     * threads.
107 >     * equivalent <tt>newFixedThreadPool(1, threadFactory)</tt> the
108 >     * returned executor is guaranteed not to be reconfigurable to use
109 >     * additional threads.
110       *
111       * @param threadFactory the factory to use when creating new
112       * threads

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines