This commit is contained in:
Kovid Goyal 2014-11-11 07:34:10 +05:30
parent cce5a0d894
commit a6670d5b92

View File

@ -412,4 +412,10 @@ def test():
raise SystemExit('No expected terminal failure') raise SystemExit('No expected terminal failure')
p.shutdown(), p.join() p.shutdown(), p.join()
# Test shutting down with busy workers
p = Pool(name='Test')
for i in range(1000):
p(i, 'import time;\ndef x(i):\n time.sleep(10000)', 'x', i)
p.shutdown(), p.join()
print ('Tests all passed!') print ('Tests all passed!')