Adding 'ask' to replace 'sendRequestReplyFuture' and removing sendRequestReply
This commit is contained in:
parent
ec9c2e100e
commit
fd5afde4ff
11 changed files with 25 additions and 62 deletions
|
|
@ -184,7 +184,7 @@ public class Pi {
|
|||
|
||||
// send calculate message
|
||||
long timeout = 60000;
|
||||
Future<Double> replyFuture = master.sendRequestReplyFuture(new Calculate(), timeout, null);
|
||||
Future<Double> replyFuture = master.ask(new Calculate(), timeout, null);
|
||||
Option<Double> result = replyFuture.await().resultOrException();
|
||||
if (result.isDefined()) {
|
||||
double pi = result.get();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue