The JVM isn't involved in that decision (any more, it was way back in Java 1.2). It's down to the OS now. So if you're using multiple threads, the OS can put them on different cores depending on its scheduling algorithms. (See also this question and its answers.)
Java Multiple Threads equals multiple Cores? [duplicate]
-
07-08-2022 - |
Question
When I use several threads in my Java application, dies the VM automatically run these threads on different cores?
La solution
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow