13 |
|
* methods that can produce a {@link Future} for tracking progress of |
14 |
|
* one or more asynchronous tasks. |
15 |
|
* |
16 |
< |
* <p> An <tt>ExecutorService</tt> can be shut down, which will cause |
16 |
> |
* <p>An <tt>ExecutorService</tt> can be shut down, which will cause |
17 |
|
* it to reject new tasks. Two different methods are provided for |
18 |
|
* shutting down an <tt>ExecutorService</tt>. The {@link #shutdown} |
19 |
|
* method will allow previously submitted tasks to execute before |
24 |
|
* unused <tt>ExecutorService</tt> should be shut down to allow |
25 |
|
* reclamation of its resources. |
26 |
|
* |
27 |
< |
* <p> Method <tt>submit</tt> extends base method {@link |
27 |
> |
* <p>Method <tt>submit</tt> extends base method {@link |
28 |
|
* Executor#execute} by creating and returning a {@link Future} that |
29 |
|
* can be used to cancel execution and/or wait for completion. |
30 |
|
* Methods <tt>invokeAny</tt> and <tt>invokeAll</tt> perform the most |
192 |
|
* for a task, you can use constructions of the form |
193 |
|
* <tt>result = exec.submit(aCallable).get();</tt> |
194 |
|
* |
195 |
< |
* <p> Note: The {@link Executors} class includes a set of methods |
195 |
> |
* <p>Note: The {@link Executors} class includes a set of methods |
196 |
|
* that can convert some other common closure-like objects, |
197 |
|
* for example, {@link java.security.PrivilegedAction} to |
198 |
|
* {@link Callable} form so they can be submitted. |