[concurrency-interest] Future.isCompletedNormally Future.isCompletedAbnormally
martinrb at google.com
Thu Mar 5 00:33:06 EST 2015
On Wed, Mar 4, 2015 at 9:23 PM, Vitaly Davidovich <vitalyd at gmail.com> wrote:
> What's the motivation for doing that? Why moving this up in the hierarchy
> is desired? These methods seem like utilities one would write on top of
> their own concrete implementations.
The motivation is "if these methods make sense for ForkJoinTask, then they
make sense for all Futures".
> Also, what's the purpose of the labeled loop? Moreover, what if get () on
> that impl always throws interrupted exception - this loops forever? I guess
> I don't like this because it makes assumptions about how the implementation
> behaves in get ().
Let's first decide whether we want these methods before fixing esoteric
bugs (throwing InterruptedException without clearing the interrupt status,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest