[concurrency-interest] question about ExecutorCompletionService

Hanson Char hanson.char at gmail.com
Thu Aug 31 18:00:09 EDT 2006


The difference is you could do something like:

        ExecutorCompletionService ecs  = ...
        ExecutorService es = ecs.getExecutor();

        if (es.isTerminated()) {
           ...
        }

No casting needed.

Hanson

On 8/31/06, Rémi Forax <forax at univ-mlv.fr> wrote:
>
> 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
>
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at altair.cs.oswego.edu
> http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/attachments/20060831/16d2e939/attachment.html 


More information about the Concurrency-interest mailing list