A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change the way the threads are launched: they are now launched as
[simgrid.git]
/
examples
/
master_slave_kill
/
Master.java
diff --git
a/examples/master_slave_kill/Master.java
b/examples/master_slave_kill/Master.java
index
f9d16a3
..
38c6ffb
100644
(file)
--- a/
examples/master_slave_kill/Master.java
+++ b/
examples/master_slave_kill/Master.java
@@
-27,6
+27,7
@@
public class Master extends Process {
try {
Msg.info("Create process on host 'alice'");
process2 = new Slave("alice","slave");
try {
Msg.info("Create process on host 'alice'");
process2 = new Slave("alice","slave");
+ process2.start();
} catch (MsgException e){
System.out.println("Process2!");
}
} catch (MsgException e){
System.out.println("Process2!");
}
@@
-41,12
+42,8
@@
public class Master extends Process {
}
}
}
}
-// FinalizeTask task = new FinalizeTask();
-// Msg.info("Send Mail2!");
-// task.send("mail2");
-
- Process.waitFor(10);
- Process.kill(process2);
-
+ process2.kill();
+
+ Msg.info("Process2 is now killed, should exit now");
}
}
}
}