pyrseus.core.sys¶

System-level utilities for the pyrseus package.

Functions

SignalHandlerCtx(signum, handler)

Safely makes a temporary change to one signal handler.

get_num_available_cores([pid, physical])

Returns the number of cores that are available to the given process for scheduling threads, respecting the CPU affinity mask when possible.

is_mp_start_method_supported(start_method)

Returns whether the given start_method is supported by the multiprocessing library, in the current process.

module_exists(name)

Tells whether the given Python module or package exists and looks importable, without actually importing it.