Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
More java approach with a specific task type for finalization instead of magic value...
[simgrid.git] / examples / java / comm_time / Slave.java
index 7c622a6..78cde4f 100644 (file)
@@ -19,13 +19,11 @@ public class Slave extends simgrid.msg.Process {
       Channel channel = new Channel(0);
                
       while(true) {
-        int a;
         double time1 = Msg.getClock();       
         Task t = channel.get();        
         double time2 = Msg.getClock();
  
         if (t instanceof FinalizeTask) {
-           Msg.info("Received Finalize " + getHost().getName());
            break;
         }
         CommTimeTask task = (CommTimeTask)t;
@@ -37,10 +35,8 @@ public class Slave extends simgrid.msg.Process {
                  " (Communication time : " +  (time2 - time1) + ")");
 */          
         task.execute();
-        
-        
       }
        
-      Msg.info("I'm done. See you!" + getHost().getName());
+      Msg.info("Received Finalize. I'm done. See you!");
    }
 }
\ No newline at end of file