From 4f66e17b36cf23a25d3930927aecc113633a611b Mon Sep 17 00:00:00 2001 From: slaws Date: Fri, 15 Oct 2010 17:41:56 +0000 Subject: Run up the async sample from the embedded launcher git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1023034 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/calculator/CalculatorServiceProxyImpl.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'sca-java-2.x/trunk/samples/learning-more/async') 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; -- cgit v1.2.3