Browse Source

SettableTask.checkCompletingThread() only resets marker after match

Issue: SPR-15409
pull/1382/head
Juergen Hoeller 9 years ago
parent
commit
8cb24e0d93
  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> {
private boolean checkCompletingThread() { private boolean checkCompletingThread() {
boolean check = (this.completingThread == Thread.currentThread()); 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; return check;
} }
} }

Loading…
Cancel
Save