Created
July 4, 2018 13:30
-
-
Save chermehdi/5b22da59e19c4df605f52c1d2f5b40bd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IntStream.range(0, 10).parallel().forEach(e -> { | |
try { | |
Thread.sleep(300); | |
System.out.println("the current working thred " + Thread.currentThread().getName()); | |
} catch (InterruptedException ex) { | |
ex.printStackTrace(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment