Browse Source

SettableTask.checkCompletingThread() only resets marker after match

Issue: SPR-15409
(cherry picked from commit 8cb24e0)
pull/1391/head
Juergen Hoeller 9 years ago
parent
commit
8321f01bf8
  1. 4
      spring-core/src/main/java/org/springframework/util/concurrent/SettableListenableFuture.java

4
spring-core/src/main/java/org/springframework/util/concurrent/SettableListenableFuture.java

@ -169,7 +169,9 @@ public class SettableListenableFuture<T> implements ListenableFuture<T> { @@ -169,7 +169,9 @@ public class SettableListenableFuture<T> implements ListenableFuture<T> {
private boolean checkCompletingThread() {
boolean check = (this.completingThread == Thread.currentThread());
this.completingThread = null; // only first check actually counts
if (check) {
this.completingThread = null; // only first match actually counts
}
return check;
}
}

Loading…
Cancel
Save