Skip to content

Commit

Permalink
dcache-bulk: cancel activity future on target cancel
Browse files Browse the repository at this point in the history
Motivation:

Neglected to cancel the future of the
activity of a task running inside the container
(instead of just the task future and the target
object).

Modification:

Add cancellation.

Result:

Correct cancellation semantics.

Target: master
Request: 9.2
Requires-notes: yes
Patch: https://rb.dcache.org/r/14121/
Acked-by: Dmitry
  • Loading branch information
alrossi committed Oct 5, 2023
1 parent 0b4140b commit 1df7a18
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,10 @@ class TargetTask extends ContainerTask {
}

void cancel() {
if (activityFuture != null) {
activityFuture.cancel(true);
}

if (target != null) {
activity.cancel(target);
}
Expand Down

0 comments on commit 1df7a18

Please sign in to comment.