Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
6a8b17c17e9c61fb5195576cfcd8ac4b5a3b7b55
[simgrid.git] / examples / java / suspend / LazyGuy.java
1 /*
2  * Copyright (c) 2006-2013. The SimGrid Team.
3  * All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of the license (GNU LGPL) which comes with this package. 
7  */
8 package suspend;
9
10 import org.simgrid.msg.Host;
11 import org.simgrid.msg.Msg;
12 import org.simgrid.msg.Process;
13 import org.simgrid.msg.MsgException;
14 public class LazyGuy extends Process {
15         public LazyGuy(Host host, String name, String[]args) {
16                 super(host,name,args);
17         } 
18         public void main(String[] args) throws MsgException {
19                 Msg.info("Nobody's watching me ? Let's go to sleep.");
20                 suspend();
21                 Msg.info("Uuuh ? Did somebody call me ?");
22                 Msg.info("Mmmh, goodbye now.");
23         }
24 }