summaryrefslogtreecommitdiff
path: root/Lib/test/test_multiprocessing.py
diff options
context:
space:
mode:
authorJesse Noller <jnoller@gmail.com>2009-07-16 14:23:04 +0000
committerJesse Noller <jnoller@gmail.com>2009-07-16 14:23:04 +0000
commit7530e47948446f03a79ad7dec4cc129ad3388418 (patch)
tree92d29c2f72031fb5a2873b2a84f9277e05113e41 /Lib/test/test_multiprocessing.py
parent2e1285baee121bd0afc3fe0176b04ea5fbe8cd49 (diff)
downloadcpython-git-7530e47948446f03a79ad7dec4cc129ad3388418.tar.gz
Issue 6433: multiprocessing.pool.map hangs on empty list
Diffstat (limited to 'Lib/test/test_multiprocessing.py')
-rw-r--r--Lib/test/test_multiprocessing.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py
index 1e4a98e4f2..29c7ff961b 100644
--- a/Lib/test/test_multiprocessing.py
+++ b/Lib/test/test_multiprocessing.py
@@ -990,6 +990,12 @@ class _TestPool(BaseTestCase):
self.assertEqual(pmap(sqr, range(100), chunksize=20),
map(sqr, range(100)))
+ def test_map_chunksize(self):
+ try:
+ self.pool.map_async(sqr, [], chunksize=1).get(timeout=TIMEOUT1)
+ except multiprocessing.TimeoutError:
+ self.fail("pool.map_async with chunksize stalled on null list")
+
def test_async(self):
res = self.pool.apply_async(sqr, (7, TIMEOUT1,))
get = TimingWrapper(res.get)