From 5f5f9232c1ce63235c6c2a5aa80c3b8b1ec761be Mon Sep 17 00:00:00 2001 From: glubsy Date: Tue, 28 Jul 2020 16:44:06 +0200 Subject: [PATCH] Properly wait for multiprocesses to exit * Fix for #693 --- core/pe/matchblock.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/core/pe/matchblock.py b/core/pe/matchblock.py index 6f2a0a27..953d39ab 100644 --- a/core/pe/matchblock.py +++ b/core/pe/matchblock.py @@ -9,7 +9,6 @@ import logging import multiprocessing from itertools import combinations -from time import sleep from hscommon.util import extract, iterconsume from hscommon.trans import tr @@ -255,9 +254,7 @@ def getmatches(pictures, cache_path, threshold, match_scaled=False, j=job.nulljo ref.dimensions # pre-read dimensions for display in results other.dimensions result.append(get_match(ref, other, percentage)) - # HACK this is a workaround for when the progress bar gets stuck sometimes, - # as we enter a deadlock somewhere and the sub-processes become zombies. - sleep(1) + pool.join() return result