Slight enhancement to the Mercurial command line server client to make it more CPU usage friendly.

Mon, 10 Oct 2011 18:54:15 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 10 Oct 2011 18:54:15 +0200
changeset 1365
8f8cad8f989e
parent 1364
a2e74a43fadc
child 1366
f2e7957924cb

Slight enhancement to the Mercurial command line server client to make it more CPU usage friendly.

Plugins/VcsPlugins/vcsMercurial/HgClient.py file | annotate | diff | comparison | revisions
--- a/Plugins/VcsPlugins/vcsMercurial/HgClient.py	Sun Oct 09 18:49:39 2011 +0200
+++ b/Plugins/VcsPlugins/vcsMercurial/HgClient.py	Mon Oct 10 18:54:15 2011 +0200
@@ -11,7 +11,7 @@
 import io
 
 from PyQt4.QtCore import QProcess, QProcessEnvironment, QObject, QByteArray, \
-    QCoreApplication
+    QCoreApplication, QThread
 from PyQt4.QtGui import QDialog
 
 from .HgClientPromptDialog import HgClientPromptDialog
@@ -240,6 +240,7 @@
                 return -10
             
             if self.__server.bytesAvailable() == 0:
+                QThread.msleep(50)
                 continue
             channel, data = self.__readChannel()
             

eric ide

mercurial