1 /* Copyright (c) 2017. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
8 /** This example demonstrates the use of the Task.dsend() method.
10 * This way, the sender can be detached from the communication: it is not blocked as with Task.send()
11 * and has nothing to do at the end as with Task.isend() where it must do a Comm.wait().
14 import org.simgrid.msg.Host;
15 import org.simgrid.msg.Msg;
19 /* This is just to ensure that nobody creates an instance of this singleton */
20 throw new IllegalAccessError("Utility class");
23 public static void main(String[] args) {
26 String platform = "../platforms/small_platform.xml";
27 if (args.length >= 1) {
28 platform = args[0]; // Override the default value if passed on the command line
31 /* construct the platform and deploy the application */
32 Msg.createEnvironment(platform);
33 Host[] hosts = Host.all();
34 new Yielder(hosts[0],"Yielder", new String[] {"10"}).start();
35 new Yielder(hosts[1],"Yielder", new String[] {"15"}).start();
37 /* execute the simulation. */