8 |
|
|
9 |
|
/** |
10 |
|
* A service that decouples the production of new asynchronous tasks |
11 |
< |
* versus the comsumption of the results of completed tasks. |
12 |
< |
* Producers <tt>submit</tt> tasks for execution. Consumers |
13 |
< |
* <tt>take</tt> completed tasks and process their results in whatever |
14 |
< |
* order they become available. A <tt>CompletionService</tt> can for |
15 |
< |
* example be used to manage asynchronous IO, in which tasks that |
16 |
< |
* perform reads are submitted in one part of a program or system, and |
17 |
< |
* then acted upon in a different part of the program when the reads |
18 |
< |
* complete, possibly in a different order than they were requested. |
11 |
> |
* from the consumption of the results of completed tasks. Producers |
12 |
> |
* <tt>submit</tt> tasks for execution. Consumers <tt>take</tt> |
13 |
> |
* completed tasks and process their results in the order they |
14 |
> |
* complete. A <tt>CompletionService</tt> can for example be used to |
15 |
> |
* manage asynchronous IO, in which tasks that perform reads are |
16 |
> |
* submitted in one part of a program or system, and then acted upon |
17 |
> |
* in a different part of the program when the reads complete, |
18 |
> |
* possibly in a different order than they were requested. |
19 |
|
|
20 |
|
* <p> |
21 |
|
* |