[ruby-core:65144] Re: [ruby-trunk - Feature #10267] [Open] Number of processors

From: Eric Wong <normalperson@...>
Date: 2014-09-20 04:03:08 UTC
List: ruby-core #65144
akr@fsij.org wrote:
> matz accepted this feature including the method name,
> Etc.nprocessors_online.

I think the name is too long.  How about naming it after the GNU
coreutils nproc(1) command?

	Etc.nproc(:online)

I think it is important to be able to get all CPUs, not just
online CPUs, too (to workaround old SMP bugs in the kernel):

	Etc.nproc(:all)

In This Thread