aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/_emerge/SequentialTaskQueue.py')
-rw-r--r--lib/_emerge/SequentialTaskQueue.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/_emerge/SequentialTaskQueue.py b/lib/_emerge/SequentialTaskQueue.py
index 318bd6c55..38ebb98d8 100644
--- a/lib/_emerge/SequentialTaskQueue.py
+++ b/lib/_emerge/SequentialTaskQueue.py
@@ -74,7 +74,10 @@ class SequentialTaskQueue(SlotObject):
"""
Clear the task queue and asynchronously terminate any running tasks.
"""
+ for task in self._task_queue:
+ task.cancel()
self._task_queue.clear()
+
for task in list(self.running_tasks):
task.cancel()