removing replySafe and replyUnsafe in favor of the unified reply/tryReply
This commit is contained in:
parent
4258abfc9f
commit
b23a8fffeb
20 changed files with 54 additions and 74 deletions
|
|
@ -73,7 +73,7 @@ public class Pi {
|
|||
public void onReceive(Object message) {
|
||||
if (message instanceof Work) {
|
||||
Work work = (Work) message;
|
||||
getContext().replyUnsafe(new Result(calculatePiFor(work.getArg(), work.getNrOfElements()))); // perform the work
|
||||
getContext().reply(new Result(calculatePiFor(work.getArg(), work.getNrOfElements()))); // perform the work
|
||||
} else throw new IllegalArgumentException("Unknown message [" + message + "]");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue