Added missing semicolon to Pi.java

This commit is contained in:
Jonas Bonér 2011-04-19 14:05:53 +02:00
parent a1cd8a9f37
commit 90d6844b4a

View file

@ -98,13 +98,14 @@ public class Pi {
Work work = (Work) message; Work work = (Work) message;
// perform the work // perform the work
double result = calculatePiFor(work.getArg(), work.getNrOfElements()) double result = calculatePiFor(work.getArg(), work.getNrOfElements());
// reply with the result // reply with the result
getContext().replyUnsafe(new Result(result)); getContext().replyUnsafe(new Result(result));
} else throw new IllegalArgumentException("Unknown message [" + message + "]"); } else throw new IllegalArgumentException("Unknown message [" + message + "]");
} }
}
// ================== // ==================
// ===== Master ===== // ===== Master =====
@ -186,7 +187,7 @@ public class Pi {
public void postStop() { public void postStop() {
// tell the world that the calculation is complete // tell the world that the calculation is complete
System.out.println(String.format( System.out.println(String.format(
"\n\tPi estimate: \t\t%s\n\tCalculation time: \t%s millis", "\n\tPi estimate: \t\t%s\n\tCalculation time: \t%s millis",
pi, (System.currentTimeMillis() - start))); pi, (System.currentTimeMillis() - start)));
latch.countDown(); latch.countDown();
} }
@ -195,7 +196,7 @@ public class Pi {
// ================== // ==================
// ===== Run it ===== // ===== Run it =====
// ================== // ==================
public void calculate(final int nrOfWorkers, final int nrOfElements, final int nrOfMessages) public void calculate(final int nrOfWorkers, final int nrOfElements, final int nrOfMessages)
throws Exception { throws Exception {
// this latch is only plumbing to know when the calculation is completed // this latch is only plumbing to know when the calculation is completed