close the pool.
This commit is contained in:
parent
92ce8a0517
commit
f1f44843c3
1 changed files with 3 additions and 1 deletions
|
@ -564,10 +564,12 @@ class Runner(object):
|
|||
|
||||
p = multiprocessing.Pool(self.forks)
|
||||
try:
|
||||
return p.map(_executor_hook, hosts)
|
||||
result = p.map(_executor_hook, hosts)
|
||||
p.close()
|
||||
except KeyboardInterrupt:
|
||||
p.terminate()
|
||||
raise errors.AnsibleError("Interrupted")
|
||||
return result
|
||||
|
||||
# *****************************************************
|
||||
|
||||
|
|
Loading…
Reference in a new issue