Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
for some reasons, the PID was sometimes not inited correctly in Java
[simgrid.git] / examples / java / app / masterworker / Worker.java
index 4236ebd..20113dd 100644 (file)
@@ -31,10 +31,10 @@ public class Worker extends Process {
     while(true) {  
       Task task = Task.receive("worker_"+num);
 
-      if (task.getName().equals("finalize")) {
+      if ("finalize".equals(task.getName())) {
         break;
       }
-      Msg.info("Received \"" + task.getName() +  "\". Processing it.");
+      Msg.info("Received \"" + task.getName() +  "\". Processing it (my pid is "+getPID()+").");
       try {
         task.execute();
       } catch (TaskCancelledException e) {