Patchwork [17,of,18] configitems: register the 'worker.backgroundclosethreadcount' config

login
register
mail settings
Submitter Pierre-Yves David
Date July 2, 2017, 10:25 p.m.
Message ID <e4a9b3bd197fef85b06e.1499034334@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/21941/
State Accepted
Headers show

Comments

Pierre-Yves David - July 2, 2017, 10:25 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1498787160 -7200
#      Fri Jun 30 03:46:00 2017 +0200
# Node ID e4a9b3bd197fef85b06e7fb81dae6746519f2e9d
# Parent  65909c3e69051008c933e548c6e12a760517559e
# 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 e4a9b3bd197f
configitems: register the 'worker.backgroundclosethreadcount' config

Patch

diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -122,3 +122,6 @@  coreconfigitem('worker', 'backgroundclos
 coreconfigitem('worker', 'backgroundcloseminfilecount',
     default=2048,
 )
+coreconfigitem('worker', 'backgroundclosethreadcount',
+    default=4,
+)
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')
-        threadcount = ui.configint('worker', 'backgroundclosethreadcount', 4)
+        threadcount = ui.configint('worker', 'backgroundclosethreadcount')
 
         ui.debug('starting %d threads for background file closing\n' %
                  threadcount)