13 |
|
* execution methods. This class implements the <tt>submit</tt>, |
14 |
|
* <tt>invokeAny</tt> and <tt>invokeAll</tt> methods using the default |
15 |
|
* {@link FutureTask} class provided in this package. For example, |
16 |
< |
* the the implementation of <tt>submit(Runnable)</tt> creates an |
16 |
> |
* the implementation of <tt>submit(Runnable)</tt> creates an |
17 |
|
* associated <tt>FutureTask</tt> that is executed and |
18 |
|
* returned. Subclasses overriding these methods to use different |
19 |
|
* {@link Future} implementations should do so consistently for each |
62 |
|
|
63 |
|
// For efficiency, especially in executors with limited |
64 |
|
// parallelism, check to see if previously submitted tasks are |
65 |
< |
// done before submitting more of them. This interleaving, |
65 |
> |
// done before submitting more of them. This interleaving |
66 |
|
// plus the exception mechanics account for messiness of main |
67 |
< |
// loop |
67 |
> |
// loop. |
68 |
|
|
69 |
|
try { |
70 |
|
// Record exceptions so that if we fail to obtain any |