From ca9e2949f325be14b5138cd995314863477badf1 Mon Sep 17 00:00:00 2001 From: Carlos Cueto Date: Tue, 19 Nov 2024 14:11:16 +0000 Subject: [PATCH] Avoid race condition in task initialisation --- mosaic/core/task.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mosaic/core/task.py b/mosaic/core/task.py index 469b621..f01dd0d 100644 --- a/mosaic/core/task.py +++ b/mosaic/core/task.py @@ -1139,7 +1139,7 @@ def _sort_dependencies(proxies, deps): proxies = self._dependencies['_'].values() tessera_inits = [] - for proxy in proxies: + for proxy in list(proxies) + [self]: tessera_inits.append(proxy._tessera_proxy.init_future) await asyncio.gather(*tessera_inits)