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:45:09 GMT
Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/816#discussion_r141621308
  
    --- Diff: core/src/main/java/org/apache/brooklyn/util/core/task/BasicExecutionManager.java
---
    @@ -706,19 +719,23 @@ public void run() {
             } else {
                 future = runner.submit(job);
             }
    +        afterSubmitRecordFuture(task, future);
    +        
    +        return task;
    +    }
    +
    +    protected <T> void afterSubmitRecordFuture(final Task<T> task, Future<T>
future) {
    --- End diff --
    
    yeah - the irritation is the matrix combination of phases (before-submit, before-start,
and after-end) x (schedule, atomic, same-thread).  but at least it's more explicit now and
sharing code wherever possible, we can more easily reason about how it could be improved.


---

Mime
View raw message