amep.utils.available_cpu_count#

amep.utils.available_cpu_count() int#

Returns the number of available CPU cores for the current process.

Some Unix systems provide a way to access the number of CPU cores available to the current process (e.g., when using CPU affinity). This function tries to use this information if available, otherwise it falls back to the total number of CPU cores in the system.

Returns:

Number of (available) CPU cores.

Return type:

int