[ 
https://issues.apache.org/jira/browse/IGNITE-4480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vladimir Ozerov updated IGNITE-4480:
------------------------------------
    Summary: Incorrect cancellation semantics in IgniteFuture  (was: Incorrect 
cancellation semantics in IgniteFuture.)

> 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
>
>
> *Problem*
> 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.
> *Solution*
> 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
(v6.3.4#6332)

Reply via email to