ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Ozerov (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-4480) Incorrect cancellation semantics in IgniteFuture.
Date Thu, 22 Dec 2016 11:08:58 GMT
Vladimir Ozerov created IGNITE-4480:

             Summary: Incorrect cancellation semantics in IgniteFuture.
                 Key: IGNITE-4480
                 URL: https://issues.apache.org/jira/browse/IGNITE-4480
             Project: Ignite
          Issue Type: Task
          Components: general
    Affects Versions: 1.8
            Reporter: Vladimir Ozerov
             Fix For: 2.0

Normally, if user invoke "cancel()" on future, he expects that it will be completed immediately.
E.g. this is how JDK {{CompletableFuture}} works. However, this is not the case for Ignite
- we inform user about cancellation through flag, which is also not set properly in most cases.

1) {{cancel()}} must complete future with special "CancellationException" immediately.
2) {{isCancelled()}} method should be either removed or deprecated.
3{ We should add {{isCompletedExceptionally()}} method which will return {{true}} in case
future was completed with any kind of exception. This will work similar to JDK {{CompletableFuture}}.

This message was sent by Atlassian JIRA

View raw message