From 0f63ca4c685526921fe087f87016732978536329 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Sun, 24 Feb 2019 20:08:33 +0000 Subject: [PATCH] Make setting affinity optional. --- ansible_mitogen/process.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ansible_mitogen/process.py b/ansible_mitogen/process.py index 0eaf25a7..6cf3a968 100644 --- a/ansible_mitogen/process.py +++ b/ansible_mitogen/process.py @@ -226,10 +226,11 @@ def _setup_responder(responder): ) -def common_setup(_init_logging=True): +def common_setup(enable_affinity=True, _init_logging=True): save_pid('controller') ansible_mitogen.logging.set_process_name('top') - ansible_mitogen.affinity.policy.assign_controller() + if enable_affinity: + ansible_mitogen.affinity.policy.assign_controller() mitogen.utils.setup_gil() if _init_logging: