Skip to content

Instantly share code, notes, and snippets.

/Threadz.java Secret

Created July 24, 2017 18:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/5fd075f29d6f45f0a814b551b32781ed to your computer and use it in GitHub Desktop.
Save anonymous/5fd075f29d6f45f0a814b551b32781ed to your computer and use it in GitHub Desktop.
public void twoDL() //current
{
ProcessBuilder DL = new ProcessBuilder("//commands").inheritIO();
Process downloading1 = DL.start();
downloading1.waitFor();
ProcessBuilder DL = new ProcessBuilder("//other commands").inheritIO();
Process downloading2 = DL.start();
downloading2.waitFor();
}
public void twoDL2() //is this faster?
{
ProcessBuilder DL = new ProcessBuilder("//commands").inheritIO();
Process downloading1 = DL.start();
DL = new ProcessBuilder("other //commands").inheritIO();
Process downloading2 = DL.start();
downloading1.waitFor();
downloading2.waitFor();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment