mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-25 11:19:52 +01:00
Change producer.outstanding.appendleft to producer.outstanding.append
This commit is contained in:
parent
23c0d41aff
commit
e5e8397154
@ -56,7 +56,7 @@ def runnable_status(self):
|
|||||||
tsk = mock_tasks[m_node]
|
tsk = mock_tasks[m_node]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
tsk = mock_tasks[m_node] = self.generator.create_task('mock', [h_node], [m_node])
|
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
|
bld.producer.total += 1
|
||||||
|
|
||||||
# preprocessor cache :-/
|
# preprocessor cache :-/
|
||||||
@ -86,7 +86,7 @@ def runnable_status(self):
|
|||||||
tsk = mock_tasks[x]
|
tsk = mock_tasks[x]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
tsk = mock_tasks[x] = self.generator.create_task('mock', [h_node], [x])
|
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
|
bld.producer.total += 1
|
||||||
|
|
||||||
add = True
|
add = True
|
||||||
|
@ -29,6 +29,8 @@ class PriorityTasks(object):
|
|||||||
self.lst = []
|
self.lst = []
|
||||||
def append(self, task):
|
def append(self, task):
|
||||||
heapq.heappush(self.lst, task)
|
heapq.heappush(self.lst, task)
|
||||||
|
def appendleft(self, task):
|
||||||
|
heapq.heappush(self.lst, task)
|
||||||
def pop(self):
|
def pop(self):
|
||||||
return heapq.heappop(self.lst)
|
return heapq.heappop(self.lst)
|
||||||
def extend(self, lst):
|
def extend(self, lst):
|
||||||
@ -41,7 +43,7 @@ class PriorityTasks(object):
|
|||||||
self.lst = lst
|
self.lst = lst
|
||||||
heapq.heapify(lst)
|
heapq.heapify(lst)
|
||||||
else:
|
else:
|
||||||
self.lst = lst.queue
|
self.lst = lst.lst
|
||||||
|
|
||||||
class Consumer(Utils.threading.Thread):
|
class Consumer(Utils.threading.Thread):
|
||||||
"""
|
"""
|
||||||
|
@ -178,7 +178,6 @@ class Task(evil):
|
|||||||
"""Set of tasks that must be executed before this one"""
|
"""Set of tasks that must be executed before this one"""
|
||||||
|
|
||||||
self.__order = 0
|
self.__order = 0
|
||||||
"""Task build order; used internally"""
|
|
||||||
|
|
||||||
def __lt__(self, other):
|
def __lt__(self, other):
|
||||||
return self.__order > other.__order or id(self) > id(other)
|
return self.__order > other.__order or id(self) > id(other)
|
||||||
|
@ -149,7 +149,7 @@ class qxx(Task.classes['cxx']):
|
|||||||
|
|
||||||
# direct injection in the build phase (safe because called from the main thread)
|
# direct injection in the build phase (safe because called from the main thread)
|
||||||
gen = self.generator.bld.producer
|
gen = self.generator.bld.producer
|
||||||
gen.outstanding.appendleft(tsk)
|
gen.outstanding.append(tsk)
|
||||||
gen.total += 1
|
gen.total += 1
|
||||||
|
|
||||||
return tsk
|
return tsk
|
||||||
|
@ -155,7 +155,7 @@ class qxx(Task.classes['cxx']):
|
|||||||
|
|
||||||
# direct injection in the build phase (safe because called from the main thread)
|
# direct injection in the build phase (safe because called from the main thread)
|
||||||
gen = self.generator.bld.producer
|
gen = self.generator.bld.producer
|
||||||
gen.outstanding.appendleft(tsk)
|
gen.outstanding.append(tsk)
|
||||||
gen.total += 1
|
gen.total += 1
|
||||||
|
|
||||||
return tsk
|
return tsk
|
||||||
|
@ -63,7 +63,7 @@ class cxx_qt(Task.classes['cxx']):
|
|||||||
# moc is trying to be too smart but it is too dumb:
|
# moc is trying to be too smart but it is too dumb:
|
||||||
# why forcing the #include when Q_OBJECT is in the cpp file?
|
# why forcing the #include when Q_OBJECT is in the cpp file?
|
||||||
gen = self.generator.bld.producer
|
gen = self.generator.bld.producer
|
||||||
gen.outstanding.appendleft(tsk)
|
gen.outstanding.append(tsk)
|
||||||
gen.total += 1
|
gen.total += 1
|
||||||
self.set_run_after(tsk)
|
self.set_run_after(tsk)
|
||||||
else:
|
else:
|
||||||
|
@ -113,7 +113,7 @@ def swig_c(self):
|
|||||||
c_tsk.set_run_after(self)
|
c_tsk.set_run_after(self)
|
||||||
|
|
||||||
ge = self.generator.bld.producer
|
ge = self.generator.bld.producer
|
||||||
ge.outstanding.appendleft(c_tsk)
|
ge.outstanding.append(c_tsk)
|
||||||
ge.total += 1
|
ge.total += 1
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user