brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahgittin <...@git.apache.org>
Subject [GitHub] brooklyn-server pull request #816: Tasks code improvements - prep for better...
Date Thu, 28 Sep 2017 13:51:11 GMT
Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/816#discussion_r141623079
  
    --- Diff: core/src/main/java/org/apache/brooklyn/util/core/task/BasicTask.java ---
    @@ -327,11 +328,10 @@ public synchronized boolean cancel(TaskCancellationMode mode) {
             return true;
         }
         
    -    @SuppressWarnings("deprecation")
         protected boolean doCancel(TaskCancellationMode mode) {
             if (internalFuture!=null) { 
    -            if (internalFuture instanceof ListenableForwardingFuture) {
    -                return ((ListenableForwardingFuture<?>)internalFuture).cancel(mode);
    +            if (internalFuture instanceof CancellingListenableForwardingFutureForTask)
{
    --- End diff --
    
    agree.  relatively easy to introduce an interface for `cancel(TaskCancellationMode)`.
 in fact i will do that here.


---

Mime
View raw message