Does Java have support for multicore processors/parallel processing?

前端 未结 5 1774
生来不讨喜
生来不讨喜 2020-11-29 19:10

I know that now that most processors have two or more cores, multicore programming is all the rage. Is there functionality to utilize this in Java? I know that Java has a Th

5条回答
  •  醉话见心
    2020-11-29 19:54

    Java 5 introduced the java.util.concurrent package which helps in building concurrent applications that can benefit from multicore systems. This package goes way beyond the multithreading functionality offered in Java 1.4 and earlier (like synchronized, wait, notify, etc).

    There's a proposal for Java 7 to include the Fork/Join framework to make use of multicore systems easier.

提交回复
热议问题