module function Etc.#nprocessors

nprocessors -> Integer[permalink][rdoc][edit]

有効な CPU コア数を返します。


require 'etc'
p Etc.nprocessors #=> 4