How Java multi-threaded program is able to use multiple CPU cores?

后端 未结 4 1487
失恋的感觉
失恋的感觉 2020-12-24 03:18

Could someone please provide explanation how Java multi-threaded program (e.g. Tomcat servlet container) is able to use all cores of CPU when JVM is only single process on l

4条回答
  •  别那么骄傲
    2020-12-24 03:59

    If you use the concurrency library and split up your work as much as you can, the JVM should handle the rest.

    Take a look at this http://embarcaderos.net/2011/01/23/parallel-processing-and-multi-core-utilization-with-java/

提交回复
热议问题