[concurrency-interest] question about ExecutorCompletionService

Rémi Forax forax at univ-mlv.fr
Thu Aug 31 16:46:03 EDT 2006


Hanson Char wrote:

> How about:
>
> public class ExecutorCompletionService<V> implements 
> CompletionService<V> {
> ...
>     // return whatever Executor as the caller wish
>     public <E extends Executor> E getExecutor() {
>         return executor;
>     }
> }
>
> Hanson

???,
i don't a big difference between
(ExecutorService)executionService.getExecutor();
and
executionService.<ExecutorService>getExceutor(); +an unsafe cast in 
getExecutor()

Rémi



More information about the Concurrency-interest mailing list