get_max_cores#
- get_max_cores() int[source]#
Retrieves the maximum number of CPU cores to be used by any function.
This function determines the number of maximum allowable cores by first attempting to fetch the value from the environment variable SERTIT_UTILS_MAX_CORES. If the environment variable is not set, it defaults to the total number of available CPU cores minus 2.
- Returns:
The maximum number of processor cores to be used.
- Return type: