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 authored and lemora committed Oct 11, 2023
1 parent 2013599 commit 3cd0912
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,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 3cd0912

Please sign in to comment.