1 |
Author: zmedico |
2 |
Date: 2008-07-29 19:30:37 +0000 (Tue, 29 Jul 2008) |
3 |
New Revision: 11269 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/_emerge/__init__.py |
7 |
Log: |
8 |
Disable auto_schedule on all of Scheduler._task_queues and schedule them |
9 |
inside _schedule_tasks(). This should help solve a tight loop. |
10 |
|
11 |
|
12 |
Modified: main/trunk/pym/_emerge/__init__.py |
13 |
=================================================================== |
14 |
--- main/trunk/pym/_emerge/__init__.py 2008-07-29 18:31:19 UTC (rev 11268) |
15 |
+++ main/trunk/pym/_emerge/__init__.py 2008-07-29 19:30:37 UTC (rev 11269) |
16 |
@@ -8826,14 +8826,8 @@ |
17 |
self._task_queues = self._task_queues_class() |
18 |
for k in self._task_queues.allowed_keys: |
19 |
setattr(self._task_queues, k, |
20 |
- SequentialTaskQueue(auto_schedule=True)) |
21 |
+ SequentialTaskQueue()) |
22 |
|
23 |
- # Merge tasks currently run synchronously which makes |
24 |
- # it necessary to disable auto_schedule in order to |
25 |
- # avoid excess recursion which prevents tasks from |
26 |
- # being marked complete as soon as they should be. |
27 |
- self._task_queues.merge.auto_schedule = False |
28 |
- |
29 |
self._prefetchers = weakref.WeakValueDictionary() |
30 |
self._pkg_queue = [] |
31 |
self._completed_tasks = set() |
32 |
@@ -9654,7 +9648,9 @@ |
33 |
self._poll_loop() |
34 |
|
35 |
def _schedule_tasks(self): |
36 |
- self._task_queues.merge.schedule() |
37 |
+ remaining, state_change = self._schedule_tasks_imp() |
38 |
+ for q in self._task_queues.values(): |
39 |
+ q.schedule() |
40 |
|
41 |
# Cancel prefetchers if they're the only reason |
42 |
# the main poll loop is still running. |