Skip to content

Commit

Permalink
vavr-io#2552 Condition to not execute actions if future is cancelled
Browse files Browse the repository at this point in the history
  • Loading branch information
charvakcpatel007 committed Jul 27, 2020
1 parent 0b7a72c commit efda9a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/io/vavr/concurrent/FutureImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ boolean tryComplete(Try<? extends T> value) {
if (waiters != null) {
waiters.forEach(this::unlock);
}
if (actions != null) {
if (actions != null && !isCancelled()) {
actions.forEach(this::perform);
return true;
} else {
Expand Down

0 comments on commit efda9a9

Please sign in to comment.