Skip to content

Instantly share code, notes, and snippets.

@yohm
Created May 9, 2016 04:21
Show Gist options
  • Save yohm/da0d5fb953b54c9e6c2cfbdc58af4560 to your computer and use it in GitHub Desktop.
Save yohm/da0d5fb953b54c9e6c2cfbdc58af4560 to your computer and use it in GitHub Desktop.
import x10.io.Console;
import x10.util.Timer;
class ParallelHelloWorld {
public static def main(args:Rail[String]):void {
val timer = new Timer();
val begin = timer.milliTime();
finish for (p in Place.places()) {
async at (p) {
Console.OUT.println("Hello, I'm " + here);
}
}
Console.ERR.println( timer.milliTime() - begin );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment