Patchwork D3963: merge: mark file gets as not thread safe

login
register
mail settings
Submitter phabricator
Date July 18, 2018, 4:55 p.m.
Message ID <9508a31e4479eb015525453ebd497a0b@localhost.localdomain>
Download mbox | patch
Permalink /patch/32903/
State Not Applicable
Headers show

Comments

phabricator - July 18, 2018, 4:55 p.m.
indygreg updated this revision to Diff 9624.
indygreg edited the summary of this revision.
indygreg retitled this revision from "merge: mark file gets as CPU heavy" to "merge: mark file gets as not thread safe".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3963?vs=9621&id=9624

REVISION DETAIL
  https://phab.mercurial-scm.org/D3963

AFFECTED FILES
  mercurial/configitems.py
  mercurial/merge.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: yuja, wlis, mercurial-devel

Patch

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -1637,9 +1637,12 @@ 
             wctx[f0].remove()
         progress.increment(item=f)
 
-    # get in parallel
+    # get in parallel.
+    threadsafe= repo.ui.configbool('experimental',
+                                   'worker.wdir-get-thread-safe')
     prog = worker.worker(repo.ui, cost, batchget, (repo, mctx, wctx),
-                         actions[ACTION_GET])
+                         actions[ACTION_GET],
+                         threadsafe=threadsafe)
     for i, item in prog:
         progress.increment(step=i, item=item)
     updated = len(actions[ACTION_GET])
diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -623,6 +623,9 @@ 
 coreconfigitem('experimental', 'web.api.debugreflect',
     default=False,
 )
+coreconfigitem('experimental', 'worker.wdir-get-thread-safe',
+    default=False,
+)
 coreconfigitem('experimental', 'xdiff',
     default=False,
 )