News for hackers. Stuff that matters.
Re:Java 12 by jacques_chester on Tuesday March 19, 2019 @09:13PM (#19437931)
The .parallel() method in Java Streams is basically one of my favourite magic spells ever.
Re:Java 12 by spricket on Tuesday March 19, 2019 @09:16PM (#19437949)
Ah yes, parallel stream(), for when you need to filter a list of 13000 entries for.... Reasons. Bad reasons.

Use it all the time :)

Re:Java 12 by jacques_chester on Tuesday March 19, 2019 @09:23PM (#19437993)
I tried it once on a simple monte carlo thingy and legitimately said "wow!" out loud when it just worked.

God, all the fussing with threads and fork-joins and mapreduces and god knows what everyone else wanted me to do: gone. Gone!

Re:Java 12 by spricket on Tuesday March 19, 2019 @09:41PM (#19438095)
Yeah seriously Java's threading support is good but the boilerplate was horrific.

One thing you should know is that parallel streams use default thread pool unless you specify otherwise. Had that choke up some REST handler threads a few times. If you think it might be an issue make sure to specify a different pool