From patchwork Mon Aug 12 23:01:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [4,of,6] plan9: prevent potential wait() From: jas@corpus-callosum.com X-Patchwork-Id: 2172 Message-Id: To: mercurial-devel@selenic.com Cc: jas@buf.io Date: Mon, 12 Aug 2013 18:01:10 -0500 # HG changeset patch # User Jeff Sickel # 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)