Thread.activeCount()运行出错问题
......
System.out.println(Thread.activeCount());
while (Thread.activeCount() > 1) {
Thread.yield();
}
System.out.println(t.getNum());
按照教程中写的代码
打印结果:
877
1000
FATAL ERROR in native method: JDWP cannot get thread local storage, jvmtiError=JVMTI_ERROR_WRONG_PHASE(112)
JDWP exit error JVMTI_ERROR_WRONG_PHASE(112): cannot get thread local storage [../../../src/share/back/threadControl.c:195]
为什么有警告输出?