BasicTools.Helpers.CPU module

class BasicTools.Helpers.CPU.CPU(nbCPUNeeded=-1, WithError=True)[source]

Bases: object

Class to help doing the multithreading without using to many cpus

cpudispo = 1
BasicTools.Helpers.CPU.CheckIntegrity()[source]
BasicTools.Helpers.CPU.GetNumberOfAvailableCpus()[source]

Function to discover the number of computing cores available.

BasicTools.Helpers.CPU.SetNumberOfThreadsPerInstance(nbThreads)[source]

Function to enforce the number of threads for various multithreaded libraries. This function should be called before importing these multithreaded libraries.