--- jsr166/src/jsr166y/ForkJoinPool.java 2009/08/05 15:40:09 1.47 +++ jsr166/src/jsr166y/ForkJoinPool.java 2009/08/06 06:41:34 1.48 @@ -23,7 +23,7 @@ import java.util.concurrent.atomic.Atomi * An {@link ExecutorService} for running {@link ForkJoinTask}s. * A {@code ForkJoinPool} provides the entry point for submissions * from non-{@code ForkJoinTask}s, as well as management and - * monitoring operations. + * monitoring operations. * *
A {@code ForkJoinPool} differs from other kinds of {@link * ExecutorService} mainly by virtue of employing @@ -82,9 +82,12 @@ import java.util.concurrent.atomic.Atomi * *
Implementation notes: This implementation restricts the * maximum number of running threads to 32767. Attempts to create - * pools with greater than the maximum result in + * pools with greater than the maximum number result in * {@code IllegalArgumentException}. * + *
This implementation rejects submitted tasks (that is, by throwing
+ * {@link RejectedExecutionException}) only when the pool is shut down.
+ *
* @since 1.7
* @author Doug Lea
*/
@@ -112,7 +115,7 @@ public class ForkJoinPool extends Abstra
* Returns a new worker thread operating in the given pool.
*
* @param pool the pool this thread works in
- * @throws NullPointerException if pool is null
+ * @throws NullPointerException if the pool is null
*/
public ForkJoinWorkerThread newThread(ForkJoinPool pool);
}
@@ -400,7 +403,7 @@ public class ForkJoinPool extends Abstra
* thread factory.
*
* @param factory the factory for creating new threads
- * @throws NullPointerException if factory is null
+ * @throws NullPointerException if the factory is null
* @throws SecurityException if a security manager exists and
* the caller is not permitted to modify threads
* because it does not hold {@link
@@ -418,7 +421,7 @@ public class ForkJoinPool extends Abstra
* @param factory the factory for creating new threads
* @throws IllegalArgumentException if parallelism less than or
* equal to zero, or greater than implementation limit
- * @throws NullPointerException if factory is null
+ * @throws NullPointerException if the factory is null
* @throws SecurityException if a security manager exists and
* the caller is not permitted to modify threads
* because it does not hold {@link
@@ -594,8 +597,9 @@ public class ForkJoinPool extends Abstra
*
* @param task the task
* @return the task's result
- * @throws NullPointerException if task is null
- * @throws RejectedExecutionException if pool is shut down
+ * @throws NullPointerException if the task is null
+ * @throws RejectedExecutionException if the task cannot be
+ * scheduled for execution
*/
public