[Updated] D8927: posixworker: avoid creating workers that end up getting no work
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Fri Aug 14 13:02:08 UTC 2020
Closed by commit rHG26eb62bd0550: posixworker: avoid creating workers that end up getting no work (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D8927?vs=22402&id=22404
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8927/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8927
AFFECTED FILES
mercurial/worker.py
CHANGE DETAILS
diff --git a/mercurial/worker.py b/mercurial/worker.py
--- a/mercurial/worker.py
+++ b/mercurial/worker.py
@@ -211,7 +211,7 @@
parentpid = os.getpid()
pipes = []
retval = {}
- for pargs in partition(args, workers):
+ for pargs in partition(args, min(workers, len(args))):
# Every worker gets its own pipe to send results on, so we don't have to
# implement atomic writes larger than PIPE_BUF. Each forked process has
# its own pipe's descriptors in the local variables, and the parent
To: martinvonz, #hg-reviewers, pulkit
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200814/6a7d45ed/attachment-0002.html>
More information about the Mercurial-patches
mailing list