Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion reframe/frontend/executors/policies.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# SPDX-License-Identifier: BSD-3-Clause

import contextlib
import functools
import itertools
import math
import sys
Expand All @@ -17,6 +18,10 @@
TaskEventListener, ABORT_REASONS)


def dictlist_len(d):
return functools.reduce(lambda l, r: l + len(r), d.values(), 0)


def _cleanup_all(tasks, *args, **kwargs):
for task in tasks:
if task.ref_count == 0:
Expand Down Expand Up @@ -416,7 +421,8 @@ def exit(self):
pollrate = PollRateFunction(0.2, 60)
num_polls = 0
t_start = datetime.now()
while (self._running_tasks or self._waiting_tasks):
while (self._running_tasks or self._waiting_tasks or
self._completed_tasks or dictlist_len(self._ready_tasks)):
getlogger().debug('running tasks: %s' % len(self._running_tasks))
num_polls += len(self._running_tasks)
try:
Expand Down