Fork me on GitHub

pyhrf.tools.cpus module

This module implements function to detect the number of allowed cpus available to the python process.

This is licensed under the CC-BY-SA 3.0 and written by Bakuriu (https://stackoverflow.com/users/510937/bakuriu), ohspite (https://stackoverflow.com/users/891129/ohspite), and Philipp Hagemeister (https://stackoverflow.com/users/35070/phihag). See https://stackoverflow.com/a/1006301

pyhrf.tools.cpus.available_cpu_count()

Number of available virtual or physical CPUs on this system, i.e. user/real as output by time(1) when called with an optimally scaling userspace-only program