140 |
|
|
141 |
|
|
142 |
|
/** |
143 |
< |
* Submits a value-returning task for execution and returns a Future |
144 |
< |
* representing the pending results of the task. |
143 |
> |
* Submits a value-returning task for execution and returns a |
144 |
> |
* Future representing the pending results of the task, and whose |
145 |
> |
* <<tt>get</tt> method will return the given result upon |
146 |
> |
* <em>successful</em> completion. |
147 |
|
* |
148 |
|
* <p> |
149 |
|
* If you would like to immediately block waiting |
164 |
|
<T> Future<T> submit(Callable<T> task); |
165 |
|
|
166 |
|
/** |
167 |
< |
* Submits a Runnable task for execution and returns a Future |
168 |
< |
* representing that task that will upon completion return |
169 |
< |
* the given result |
167 |
> |
* Submits a Runnable task for execution and returns a Future |
168 |
> |
* representing that task that will upon successful completion |
169 |
> |
* return the given result. |
170 |
|
* |
171 |
|
* @param task the task to submit |
172 |
|
* @param result the result to return |
173 |
|
* @return a Future representing pending completion of the task, |
174 |
|
* and whose <tt>get()</tt> method will return the given result |
175 |
< |
* upon completion. |
175 |
> |
* upon successful completion. |
176 |
|
* @throws RejectedExecutionException if task cannot be scheduled |
177 |
|
* for execution |
178 |
|
* @throws NullPointerException if task null |
186 |
|
* @param task the task to submit |
187 |
|
* @return a Future representing pending completion of the task, |
188 |
|
* and whose <tt>get()</tt> method will return <tt>null</tt> |
189 |
< |
* upon completion. |
189 |
> |
* upon successful completion. |
190 |
|
* @throws RejectedExecutionException if task cannot be scheduled |
191 |
|
* for execution |
192 |
|
* @throws NullPointerException if task null |