Skip to content

Commit beece3d

Browse files
committed
Added volatile to ServiceFuture's valueSet flag, so in case isCancelled gets called from a thread other than the subscribe thread the calling thread sees the value change.
1 parent 271d7c4 commit beece3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client-runtime/src/main/java/com/microsoft/rest/ServiceFuture.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class ServiceFuture<T> extends AbstractFuture<T> {
2525
* The Retrofit method invocation.
2626
*/
2727
private Subscription subscription;
28-
private boolean valueSet = false;
28+
private volatile boolean valueSet = false;
2929

3030
protected ServiceFuture() {
3131
}

0 commit comments

Comments
 (0)