summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2020-05-02 18:36:34 +0200
committerGiampaolo Rodola <g.rodola@gmail.com>2020-05-02 18:36:34 +0200
commit3190b4085e8b836f78d346bd07d6710d1f663262 (patch)
tree548f4bd97c838396121b499af6550a6d9841f1c4
parent16c3b1c108c4de010f751dead4d6a0ab52a8d255 (diff)
downloadpsutil-3190b4085e8b836f78d346bd07d6710d1f663262.tar.gz
speedup process Pool by using imap_unordered (we don't care what order processes come in)
-rwxr-xr-xpsutil/tests/test_contracts.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/psutil/tests/test_contracts.py b/psutil/tests/test_contracts.py
index 768d4365..c0889843 100755
--- a/psutil/tests/test_contracts.py
+++ b/psutil/tests/test_contracts.py
@@ -358,7 +358,7 @@ class TestFetchAllProcesses(PsutilTestCase):
from psutil.tests.test_contracts import proc_info
with multiprocessing.Pool() as pool:
- for info in pool.map(proc_info, psutil.pids()):
+ for info in pool.imap_unordered(proc_info, psutil.pids()):
for name, value in info.items():
meth = getattr(self, name)
meth(value, info)