def set_child_affinity_mask(self, pid, child_index): i = child_index+1 if self.CPU_AFFINITY_STRATEGY == CPU_AFFINITY_STRATEGY_PARENT_INCLUDED else child_index set_processor_affinity([i%self.cpu_count], pid=pid)
def set_parent_affinity_mask(self): if self.CPU_AFFINITY_STRATEGY == CPU_AFFINITY_STRATEGY_PARENT_INCLUDED: set_processor_affinity([0])