From 7bcbab70f0d04c0eb3e311e382c6821f3ea6219a Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Thu, 26 Apr 2018 09:42:18 -0700 Subject: [PATCH] Clarify the comments for action_write_locks Also explain why there's no special optimization for service managers at the moment --- lib/ansible/executor/action_write_locks.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/ansible/executor/action_write_locks.py b/lib/ansible/executor/action_write_locks.py index b6486cb7d46..dfc7f9c9274 100644 --- a/lib/ansible/executor/action_write_locks.py +++ b/lib/ansible/executor/action_write_locks.py @@ -29,14 +29,14 @@ if 'action_write_locks' not in globals(): # when it forks? action_write_locks = dict() - # Below is a Lock for use when we weren't expecting a named module. - # It gets used when an action plugin directly invokes a module instead - # of going through the strategies. Slightly less efficient as all - # processes with unexpected module names will wait on this lock + # Below is a Lock for use when we weren't expecting a named module. It gets used when an action + # plugin invokes a module whose name does not match with the action's name. Slightly less + # efficient as all processes with unexpected module names will wait on this lock action_write_locks[None] = Lock() - # These plugins are called directly by action plugins (not going through - # a strategy). We precreate them here as an optimization + # These plugins are known to be called directly by action plugins with names differing from the + # action plugin name. We precreate them here as an optimization. + # If a list of service managers is created in the future we can do the same for them. mods = set(p['name'] for p in PKG_MGRS) mods.update(('copy', 'file', 'setup', 'slurp', 'stat'))