Single thread program to make use of multiple cores

前端 未结 3 1294
南旧
南旧 2021-01-17 20:36

Can a single thread of a Java program automatically make use of multiple cores on the CPU?

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-17 21:33

    Your own code will not run on multiple cores if it is by definition single threaded. No single threaded application can run simultaneously on multiple cores - unless your using underluing multithreaded calls/libraries without knowing.

提交回复
热议问题