Change producer.outstanding.appendleft to producer.outstanding.append

This commit is contained in:
Thomas Nagy 2017-06-14 19:53:01 +02:00
parent 23c0d41aff
commit e5e8397154
7 changed files with 9 additions and 8 deletions

View File

@ -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

View File

@ -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):
"""

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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: