Rails
Ruby 2.5.0
6.1
6.0
5.2
5.1
5.0
4.2
2.6.0
2.7.0
3.0
module function Etc.#nprocessors
nprocessors -> Integer
[
permalink
][
rdoc
][
edit
]
有効な CPU コア数を返します。
例:
require 'etc' p Etc.nprocessors #=> 4