summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/samples/learning-more
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/trunk/samples/learning-more')
-rw-r--r--sca-java-2.x/trunk/samples/learning-more/async/calculator-contribution/src/main/java/calculator/CalculatorServiceProxyImpl.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/samples/learning-more/async/calculator-contribution/src/main/java/calculator/CalculatorServiceProxyImpl.java b/sca-java-2.x/trunk/samples/learning-more/async/calculator-contribution/src/main/java/calculator/CalculatorServiceProxyImpl.java
index f27bf7f7f4..351ba9c5ef 100644
--- a/sca-java-2.x/trunk/samples/learning-more/async/calculator-contribution/src/main/java/calculator/CalculatorServiceProxyImpl.java
+++ b/sca-java-2.x/trunk/samples/learning-more/async/calculator-contribution/src/main/java/calculator/CalculatorServiceProxyImpl.java
@@ -65,6 +65,11 @@ public class CalculatorServiceProxyImpl implements CalculatorServiceSync {
while (!response.isDone()){
System.out.println("Waiting for poll");
+ try {
+ Thread.sleep(500);
+ } catch (Exception ex) {
+ // do nothing
+ }
}
try {
@@ -84,6 +89,11 @@ public class CalculatorServiceProxyImpl implements CalculatorServiceSync {
while (!future.isDone()){
System.out.println("Waiting for callback");
+ try {
+ Thread.sleep(500);
+ } catch (Exception ex) {
+ // do nothing
+ }
}
return result;