From 791c3346db10d6c7e71fc37a8b637d9e6e805ec1 Mon Sep 17 00:00:00 2001 From: "bodong.yang" Date: Mon, 24 Jun 2024 09:41:15 +0000 Subject: [PATCH] always release se first --- src/otaclient/app/create_standby/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/otaclient/app/create_standby/common.py b/src/otaclient/app/create_standby/common.py index 3b0cdcfcd..fabc6ff8e 100644 --- a/src/otaclient/app/create_standby/common.py +++ b/src/otaclient/app/create_standby/common.py @@ -332,11 +332,11 @@ def _initializer(): thread_local.view = memoryview(buffer) def _task_done_callback(fut: Future[Any]): + max_pending_tasks.release() # always release se first if exc := fut.exception(): logger.warning( f"detect error during file preparing, still continue: {exc!r}" ) - max_pending_tasks.release() pool = ThreadPoolExecutor( max_workers=cfg.MAX_PROCESS_FILE_THREAD,