From e5e8397154f44244ba1f0615688b985f9c9bbc53 Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Wed, 14 Jun 2017 19:53:01 +0200 Subject: [PATCH] Change producer.outstanding.appendleft to producer.outstanding.append --- playground/dynamic_headers/wscript | 4 ++-- waflib/Runner.py | 4 +++- waflib/Task.py | 1 - waflib/Tools/qt5.py | 2 +- waflib/extras/qt4.py | 2 +- waflib/extras/slow_qt4.py | 2 +- waflib/extras/swig.py | 2 +- 7 files changed, 9 insertions(+), 8 deletions(-) diff --git a/playground/dynamic_headers/wscript b/playground/dynamic_headers/wscript index a8f06f6a..82b909a7 100644 --- a/playground/dynamic_headers/wscript +++ b/playground/dynamic_headers/wscript @@ -56,7 +56,7 @@ def runnable_status(self): tsk = mock_tasks[m_node] except KeyError: tsk = mock_tasks[m_node] = self.generator.create_task('mock', [h_node], [m_node]) - bld.producer.outstanding.appendleft(tsk) + bld.producer.outstanding.append(tsk) bld.producer.total += 1 # preprocessor cache :-/ @@ -86,7 +86,7 @@ def runnable_status(self): tsk = mock_tasks[x] except KeyError: tsk = mock_tasks[x] = self.generator.create_task('mock', [h_node], [x]) - bld.producer.outstanding.appendleft(tsk) + bld.producer.outstanding.append(tsk) bld.producer.total += 1 add = True diff --git a/waflib/Runner.py b/waflib/Runner.py index b171ed42..2fb7da3f 100644 --- a/waflib/Runner.py +++ b/waflib/Runner.py @@ -29,6 +29,8 @@ class PriorityTasks(object): self.lst = [] def append(self, task): heapq.heappush(self.lst, task) + def appendleft(self, task): + heapq.heappush(self.lst, task) def pop(self): return heapq.heappop(self.lst) def extend(self, lst): @@ -41,7 +43,7 @@ class PriorityTasks(object): self.lst = lst heapq.heapify(lst) else: - self.lst = lst.queue + self.lst = lst.lst class Consumer(Utils.threading.Thread): """ diff --git a/waflib/Task.py b/waflib/Task.py index 3628b7dd..30a60ec6 100644 --- a/waflib/Task.py +++ b/waflib/Task.py @@ -178,7 +178,6 @@ class Task(evil): """Set of tasks that must be executed before this one""" self.__order = 0 - """Task build order; used internally""" def __lt__(self, other): return self.__order > other.__order or id(self) > id(other) diff --git a/waflib/Tools/qt5.py b/waflib/Tools/qt5.py index c126064b..2c007eef 100644 --- a/waflib/Tools/qt5.py +++ b/waflib/Tools/qt5.py @@ -149,7 +149,7 @@ class qxx(Task.classes['cxx']): # direct injection in the build phase (safe because called from the main thread) gen = self.generator.bld.producer - gen.outstanding.appendleft(tsk) + gen.outstanding.append(tsk) gen.total += 1 return tsk diff --git a/waflib/extras/qt4.py b/waflib/extras/qt4.py index 08477a67..565a4527 100644 --- a/waflib/extras/qt4.py +++ b/waflib/extras/qt4.py @@ -155,7 +155,7 @@ class qxx(Task.classes['cxx']): # direct injection in the build phase (safe because called from the main thread) gen = self.generator.bld.producer - gen.outstanding.appendleft(tsk) + gen.outstanding.append(tsk) gen.total += 1 return tsk diff --git a/waflib/extras/slow_qt4.py b/waflib/extras/slow_qt4.py index 993eb3c7..dc18b4ed 100644 --- a/waflib/extras/slow_qt4.py +++ b/waflib/extras/slow_qt4.py @@ -63,7 +63,7 @@ class cxx_qt(Task.classes['cxx']): # moc is trying to be too smart but it is too dumb: # why forcing the #include when Q_OBJECT is in the cpp file? gen = self.generator.bld.producer - gen.outstanding.appendleft(tsk) + gen.outstanding.append(tsk) gen.total += 1 self.set_run_after(tsk) else: diff --git a/waflib/extras/swig.py b/waflib/extras/swig.py index 94629c78..dd0e9af2 100644 --- a/waflib/extras/swig.py +++ b/waflib/extras/swig.py @@ -113,7 +113,7 @@ def swig_c(self): c_tsk.set_run_after(self) ge = self.generator.bld.producer - ge.outstanding.appendleft(c_tsk) + ge.outstanding.append(c_tsk) ge.total += 1 try: