NumCPU
Overview
numcpu.NumCPU() returns the number of logical CPUs usable by the current process.
Android doesn't return max number of CPUs by runtime.NumCPU(),
but just returns number of "working" CPUs.
So this library checks sysfs directory directly for linux, and just returns runtime.NumCPU() for others.
Requirements
are required to compile.
Install
$ go get -u github.com/AidosKuneen/numcpu
Usage
import "github.com/AidosKuneen/numcpu"
n:=numcpu.NumCPU()
Dependencies and Licenses
Golang Standard Library BSD 3-clause License