From e7fe802b1d487d62b2d86c3a09ac93a75dc2de15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Mon, 21 Jun 2021 17:39:35 +0200 Subject: [PATCH] fixed bug on wait for tasks --- client-py3/full/src/uds/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client-py3/full/src/uds/tools.py b/client-py3/full/src/uds/tools.py index 600cf2a6..288c2ca4 100644 --- a/client-py3/full/src/uds/tools.py +++ b/client-py3/full/src/uds/tools.py @@ -158,7 +158,7 @@ def addTaskToWait(taks: typing.Any, includeSubprocess: bool = False) -> None: def waitForTasks() -> None: logger.debug('Started to wait %s', _tasksToWait) - for task, waitForSubp in _tasksToWait: + for task, waitForSubp in sorted(_tasksToWait, key=lambda x: int(x[1])): logger.debug('Waiting for task %s, subprocess wait: %s', task, waitForSubp) try: if hasattr(task, 'join'):