Github user aledsage commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/835#discussion_r142920565
--- Diff:
core/src/main/java/org/apache/brooklyn/util/core/task/BasicExecutionManager.java
---
@@ -797,6 +800,7 @@ public TaskLookup(BasicExecutionManager mgr, Task<?> t)
{
.description("Details of the original task have been
forgotten.")
.body(Callables.returning((T)null)).build();
((BasicTask<T>)t).ignoreIfNotRun();
+ ((BasicTask<T>)t).cancelled = true;
--- End diff --
Worth a comment saying why you're setting `cancelled = true`. I presume
it's because we don't really want anyone executing the "gone" task, and more
importantly that if we are GC'ing tasks then marking the "gone" task as
cancelled will help with cleanup of sub-tasks that have lost their
submitted-by-task reference?
---