I have a question been looking for an answer for a lot in the internet, I'm still new to concurrency, as far as I understand parallel is different from concurrency, parallel allow the program to execute faster and take advantage of multi core processors, after I have done some research I found that I can't do parallel programming nativly in java and I need to get some third-party library for that, my question is how java implemented parallel in streams, what packages it uses to implement that?
Asked
Active
Viewed 30 times
1
-
Not sure where you found that information.Just a simple search -> https://stackoverflow.com/questions/2238272/java-thread-affinity. Answers your question. – bichito Apr 04 '20 at 15:26
-
It didn't answer my question :( – Apr 04 '20 at 15:30
-
Ok. If you read it implies that the JVM assigns a thread per core. That you can not lock that pair from the JVM. Then if you start from the source -> https://docs.oracle.com/javase/tutorial/collections/streams/parallelism.html You can figure out that your question does not make much sense. I am not the person who down votes – bichito Apr 04 '20 at 15:35
-
Okay, I understand now – Apr 04 '20 at 15:43
-
I am not trying to be mean. SO is great but there are a lot of bad answers. And a lot of SO cut-and-paste code in production that in those particular contexts makes no sense. Don't give up your thinking cap for SO. – bichito Apr 04 '20 at 15:47
-
Not a problem at all. – bichito Apr 04 '20 at 15:51