如果我有多核机器,Java 线程是否运行在不同的处理器内核上?换句话说,如果我运行 Thread.start(),这个线程是绿色的还是原生的?
谢谢
最佳答案
In Java 1.1, green threads were the only threading model used by the JVM, at least on Solaris. As green threads have some limitations compared to native threads, subsequent Java versions dropped them in favor of native threads.
An exception to this is the Squawk virtual machine, which is a mixture between an operating system for low-power devices and a Java virtual machine. It uses green threads in order to keep the native code to an absolute minimum and to support the migration of its isolates.
所以说Wikipedia .
关于Java 线程,绿色还是原生?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10258474/