[PATCH 4 of 6] plan9: prevent potential wait()
Jeff Sickel
jas at corpus-callosum.com
Mon Aug 12 18:01:10 CDT 2013
# HG changeset patch
# User Jeff Sickel <jas at corpus-callosum.com>
# Date 1376347561 18000
# Mon Aug 12 17:46:01 2013 -0500
# Branch stable
# Node ID b55c76e1f4c1726e2a537efa1b99c360626ac23d
# Parent c92381647a5b63b85355bf62a60df8d13fc5f858
plan9: prevent potential wait()
diff -r c92381647a5b -r b55c76e1f4c1 mercurial/worker.py
--- a/mercurial/worker.py Mon Aug 12 17:44:31 2013 -0500
+++ b/mercurial/worker.py Mon Aug 12 17:46:01 2013 -0500
@@ -48,6 +48,9 @@
def worthwhile(ui, costperop, nops):
'''try to determine whether the benefit of multiple processes can
outweigh the cost of starting them'''
+ # this trivial calculation does not benefit plan 9
+ if sys.platform == 'plan9':
+ return 0
linear = costperop * nops
workers = _numworkers(ui)
benefit = linear - (_startupcost * workers + linear / workers)
More information about the Mercurial-devel
mailing list