1
0
Fork 0
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:
Michael DeHaan 2012-10-24 07:56:23 -04:00
parent 92ce8a0517
commit f1f44843c3

View file

@ -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
# *****************************************************