Created
September 29, 2016 16:31
-
-
Save kellyfj/cc915cefea08e95d64de338fe85e3976 to your computer and use it in GitHub Desktop.
Parallelizing a fixed number range of long running actions
This file contains 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
//Parallelizing a fixed number range of long running actions | |
IntStream.range(0, NUM_OBJECTS_TO_CREATE).parallel().forEach(i -> { | |
//Your long running stuff goes here | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment