diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2020-05-02 18:36:34 +0200 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2020-05-02 18:36:34 +0200 |
commit | 3190b4085e8b836f78d346bd07d6710d1f663262 (patch) | |
tree | 548f4bd97c838396121b499af6550a6d9841f1c4 | |
parent | 16c3b1c108c4de010f751dead4d6a0ab52a8d255 (diff) | |
download | psutil-3190b4085e8b836f78d346bd07d6710d1f663262.tar.gz |
speedup process Pool by using imap_unordered (we don't care what order processes come in)
-rwxr-xr-x | psutil/tests/test_contracts.py | 2 |
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) |