Patchwork [01,of,17] configitems: gather comment related to 'worker.backgroundclosemaxqueue'

login
register
mail settings
Submitter Pierre-Yves David
Date July 4, 2017, 11:10 p.m.
Message ID <96ee71e022a1ecf49435.1499209829@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/21979/
State Accepted
Headers show

Comments

Pierre-Yves David - July 4, 2017, 11:10 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1499205690 -7200
#      Wed Jul 05 00:01:30 2017 +0200
# Node ID 96ee71e022a1ecf494350b956c6b9f854edd4643
# Parent  c9849bec227a83355e5c12e74abca6f77ce636c4
# EXP-Topic config.register.follow-up
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
#              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r 96ee71e022a1
configitems: gather comment related to 'worker.backgroundclosemaxqueue'

Thanks to Yuya for pointing this out.

Patch

diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -155,6 +155,8 @@  coreconfigitem('ui', 'interactive',
 coreconfigitem('ui', 'quiet',
     default=False,
 )
+# Windows defaults to a limit of 512 open files. A buffer of 128
+# should give us enough headway.
 coreconfigitem('worker', 'backgroundclosemaxqueue',
     default=384,
 )
diff --git a/mercurial/vfs.py b/mercurial/vfs.py
--- a/mercurial/vfs.py
+++ b/mercurial/vfs.py
@@ -547,8 +547,6 @@  class backgroundfilecloser(object):
         if expectedcount > 0 and expectedcount < minfilecount:
             return
 
-        # 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')