Submitter | Pierre-Yves David |
---|---|
Date | July 2, 2017, 10:25 p.m. |
Message ID | <738344bfccade4f9b339.1499034332@nodosa.octopoid.net> |
Download | mbox | patch |
Permalink | /patch/21937/ |
State | Accepted |
Headers | show |
Comments
On Mon, 03 Jul 2017 00:25:32 +0200, Pierre-Yves David wrote: > # HG changeset patch > # User Pierre-Yves David <pierre-yves.david@octobus.net> > # Date 1498787158 -7200 > # Fri Jun 30 03:45:58 2017 +0200 > # Node ID 738344bfccade4f9b339ed54fc599523ef66dc71 > # Parent c077eac329e26a4ca7da8b80071ba9161994bcfe > # EXP-Topic config.register.worker > # Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ > # hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r 738344bfccad > configitems: register the 'worker.backgroundclosemaxqueue' config > > diff --git a/mercurial/configitems.py b/mercurial/configitems.py > --- a/mercurial/configitems.py > +++ b/mercurial/configitems.py > @@ -116,3 +116,6 @@ coreconfigitem('ui', 'interactive', > coreconfigitem('ui', 'quiet', > default=False, > ) > +coreconfigitem('worker', 'backgroundclosemaxqueue', > + default=384, > +) > diff --git a/mercurial/vfs.py b/mercurial/vfs.py > --- a/mercurial/vfs.py > +++ b/mercurial/vfs.py > @@ -550,7 +550,7 @@ class backgroundfilecloser(object): > > # Windows defaults to a limit of 512 open files. A buffer of 128 > # should give us enough headway. > - maxqueue = ui.configint('worker', 'backgroundclosemaxqueue', 384) > + maxqueue = ui.configint('worker', 'backgroundclosemaxqueue') Perhaps the comment above is reasoning of the default value, 384. Shouldn't we move the comment as well?
On 07/04/2017 04:25 PM, Yuya Nishihara wrote: > On Mon, 03 Jul 2017 00:25:32 +0200, Pierre-Yves David wrote: >> # HG changeset patch >> # User Pierre-Yves David <pierre-yves.david@octobus.net> >> # Date 1498787158 -7200 >> # Fri Jun 30 03:45:58 2017 +0200 >> # Node ID 738344bfccade4f9b339ed54fc599523ef66dc71 >> # Parent c077eac329e26a4ca7da8b80071ba9161994bcfe >> # EXP-Topic config.register.worker >> # Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ >> # hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r 738344bfccad >> configitems: register the 'worker.backgroundclosemaxqueue' config >> >> diff --git a/mercurial/configitems.py b/mercurial/configitems.py >> --- a/mercurial/configitems.py >> +++ b/mercurial/configitems.py >> @@ -116,3 +116,6 @@ coreconfigitem('ui', 'interactive', >> coreconfigitem('ui', 'quiet', >> default=False, >> ) >> +coreconfigitem('worker', 'backgroundclosemaxqueue', >> + default=384, >> +) >> diff --git a/mercurial/vfs.py b/mercurial/vfs.py >> --- a/mercurial/vfs.py >> +++ b/mercurial/vfs.py >> @@ -550,7 +550,7 @@ class backgroundfilecloser(object): >> >> # Windows defaults to a limit of 512 open files. A buffer of 128 >> # should give us enough headway. >> - maxqueue = ui.configint('worker', 'backgroundclosemaxqueue', 384) >> + maxqueue = ui.configint('worker', 'backgroundclosemaxqueue') > > Perhaps the comment above is reasoning of the default value, 384. Shouldn't > we move the comment as well? Good catch, will followup Cheers,
Patch
diff --git a/mercurial/configitems.py b/mercurial/configitems.py --- a/mercurial/configitems.py +++ b/mercurial/configitems.py @@ -116,3 +116,6 @@ coreconfigitem('ui', 'interactive', coreconfigitem('ui', 'quiet', default=False, ) +coreconfigitem('worker', 'backgroundclosemaxqueue', + default=384, +) diff --git a/mercurial/vfs.py b/mercurial/vfs.py --- a/mercurial/vfs.py +++ b/mercurial/vfs.py @@ -550,7 +550,7 @@ class backgroundfilecloser(object): # Windows defaults to a limit of 512 open files. A buffer of 128 # should give us enough headway. - maxqueue = ui.configint('worker', 'backgroundclosemaxqueue', 384) + maxqueue = ui.configint('worker', 'backgroundclosemaxqueue') threadcount = ui.configint('worker', 'backgroundclosethreadcount', 4) ui.debug('starting %d threads for background file closing\n' %