Skip to content

Instantly share code, notes, and snippets.

@ymurase
Last active August 29, 2015 14:11
Show Gist options
  • Save ymurase/55cca64b67d3991ff1cd to your computer and use it in GitHub Desktop.
Save ymurase/55cca64b67d3991ff1cd to your computer and use it in GitHub Desktop.
x10で外部プロセス実行
import x10.io.Console;
import x10.lang.Runtime;
public class RunProgram {
public static def main(args: Rail[String]) {
val times: Long = 10;
for(var k: Long = 0; k< times; k++) {
Console.OUT.println(" I am launching "+ k);
val t = Runtime.execForWrite("sleep 5 && echo " + k);
// t.close();
}
Console.OUT.println("Done!" );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment