[PATCH 4 of 6] plan9: prevent potential wait()

Augie Fackler raf at durin42.com
Tue Aug 13 15:58:15 CDT 2013


On Mon, Aug 12, 2013 at 06:01:10PM -0500, Jeff Sickel wrote:
> # 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()

Not sure I understand what the value of this is - how does this wait()
for you, rather than being a (trivial, stupidly cheap) arithmetic
operation?

>
> 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)
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list