mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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