Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Let simgrid.dtd to be accessible from the web in order to enable automatic validation...
[simgrid.git] / examples / cxx / suspend / LazyGuy.cxx
1 #include "LazyGuy.hpp"
2 #include <MsgHost.hpp>
3
4 #include <Msg.hpp>
5
6 // Not needed : DreamMaster directly constructs the object
7 // MSG_IMPLEMENT_DYNAMIC(LazyGuy, Process)
8
9 int LazyGuy::main(int argc, char** argv)
10 {
11         info("Hello !");
12         
13         info("Nobody's watching me ? Let's go to sleep.");
14         
15         Process::currentProcess().suspend();
16         
17         info("Uuuh ? Did somebody call me ?");
18         
19         info("Mmmh, goodbye now."); 
20
21         delete this;
22
23         return 0;
24 }
25