X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/8462a1a27d5d9595a90f6c4f6dc65e70d279e6e3..dc0a22c53a395e19ce8e65b64cb2a51c36aea261:/examples/async/Forwarder.java diff --git a/examples/async/Forwarder.java b/examples/async/Forwarder.java index d17bb9343e..29e9d1835b 100644 --- a/examples/async/Forwarder.java +++ b/examples/async/Forwarder.java @@ -6,6 +6,7 @@ */ package async; +import org.simgrid.msg.Host; import org.simgrid.msg.Msg; import org.simgrid.msg.MsgException; import org.simgrid.msg.Task; @@ -13,7 +14,9 @@ import org.simgrid.msg.Process; public class Forwarder extends Process { - + public Forwarder(Host host, String name, String[]args) { + super(host,name,args); + } public void main(String[] args) throws MsgException { if (args.length < 3) { Msg.info("Forwarder needs 3 arguments (input mailbox, first output mailbox, last one)"); @@ -37,7 +40,7 @@ public class Forwarder extends Process { Task tf = new FinalizeTask(); tf.dsend("slave_"+cpt); } - simulatedSleep(20); + waitFor(20); break; } int dest = firstOutput + (taskCount % slavesCount);