--- a/hgext/progress.py Sat Jan 17 13:10:37 2015 -0800
+++ b/hgext/progress.py Sat Jan 17 13:13:16 2015 -0800
@@ -37,6 +37,7 @@
import sys
import time
+import threading
from mercurial.i18n import _
testedwith = 'internal'
@@ -90,6 +91,7 @@
class progbar(object):
def __init__(self, ui):
self.ui = ui
+ self._refreshlock = threading.Lock()
self.resetstate()
def resetstate(self):
@@ -241,6 +243,7 @@
def progress(self, topic, pos, item='', unit='', total=None):
now = time.time()
+ self._refreshlock.acquire()
try:
if pos is None:
self.starttimes.pop(topic, None)
@@ -273,7 +276,7 @@
self.lastprint = now
self.show(now, topic, *self.topicstates[topic])
finally:
- pass
+ self._refreshlock.release()
_singleton = None