File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
reframe/frontend/executors Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 44# SPDX-License-Identifier: BSD-3-Clause
55
66import contextlib
7+ import functools
78import itertools
89import math
910import sys
1718 TaskEventListener , ABORT_REASONS )
1819
1920
21+ def values_len (d ):
22+ return functools .reduce (lambda l , r : l + len (r ), d .values (), 0 )
23+
24+
2025def _cleanup_all (tasks , * args , ** kwargs ):
2126 for task in tasks :
2227 if task .ref_count == 0 :
@@ -417,7 +422,7 @@ def exit(self):
417422 num_polls = 0
418423 t_start = datetime .now ()
419424 while (self ._running_tasks or self ._waiting_tasks or
420- self ._completed_tasks or sum (self ._ready_tasks . values (), [] )):
425+ self ._completed_tasks or values_len (self ._ready_tasks )):
421426 getlogger ().debug ('running tasks: %s' % len (self ._running_tasks ))
422427 num_polls += len (self ._running_tasks )
423428 try :
You can’t perform that action at this time.
0 commit comments