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

Pierre-Yves David pierre-yves.david at ens-lyon.org
Sun Jul 2 22:25:34 UTC 2017


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at 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

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)



More information about the Mercurial-devel mailing list