Skip to content

Instantly share code, notes, and snippets.

@thabofletcher
Created March 27, 2015 21:31
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 thabofletcher/7f7d0909ac8a3e302826 to your computer and use it in GitHub Desktop.
Save thabofletcher/7f7d0909ac8a3e302826 to your computer and use it in GitHub Desktop.
IntStream.range(0, items.length)
.parallel()
.forEach(i -> {
String messageBody = messages.get(i).getBody();
try {
items[i] = mapper.readValue(messageBody, type);
} catch (IOException e) {
e.printStackTrace();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment