Skip to content

Commit

Permalink
default implementation for clean method (#80)
Browse files Browse the repository at this point in the history
Signed-off-by: Thang PHAM <[email protected]>
  • Loading branch information
thangqp authored Oct 30, 2024
1 parent be3fbde commit 7eecbea
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,20 @@ public Consumer<Message<String>> consumeRun() {
this.handleNonCancellationException(resultContext, e, rootReporter);
}
} finally {
futures.remove(resultContext.getResultUuid());
cancelComputationRequests.remove(resultContext.getResultUuid());
clean(resultContext);
}
};
}

/**
* Perform cleaning
* @param resultContext The context of the computation
*/
protected void clean(AbstractResultContext<C> resultContext) {
futures.remove(resultContext.getResultUuid());
cancelComputationRequests.remove(resultContext.getResultUuid());
}

/**
* Handle exception in consumeRun that is not a CancellationException
* @param resultContext The context of the computation
Expand Down

0 comments on commit 7eecbea

Please sign in to comment.