可以 Runtime.getRuntime().availableProcessors() return 0 吗?
Can Runtime.getRuntime().availableProcessors() return 0?
是否存在Runtime.getRuntime().availableProcessors()
returns0
的特定条件?
也许当所有处理器都忙时?
没有
http://docs.oracle.com/javase/8/docs/api/java/lang/Runtime.html#availableProcessors--
"the maximum number of processors available to the virtual machine; never smaller than one"
没有。根据文档,Runtime.availableProcessors()
永远不会 return 小于 1。
Returns:
The maximum number of processors available to the virtual machine; never smaller than one
https://docs.oracle.com/javase/7/docs/api/java/lang/Runtime.html#availableProcessors()
是否存在Runtime.getRuntime().availableProcessors()
returns0
的特定条件?
也许当所有处理器都忙时?
没有
http://docs.oracle.com/javase/8/docs/api/java/lang/Runtime.html#availableProcessors--
"the maximum number of processors available to the virtual machine; never smaller than one"
没有。根据文档,Runtime.availableProcessors()
永远不会 return 小于 1。
Returns: The maximum number of processors available to the virtual machine; never smaller than one
https://docs.oracle.com/javase/7/docs/api/java/lang/Runtime.html#availableProcessors()