Force 1 worker for all estimates
This commit is contained in:
parent
7faaa1ead9
commit
c1ff11d18d
2 changed files with 6 additions and 2 deletions
|
|
@ -414,7 +414,8 @@ class TranslationWorker(QThread):
|
|||
total_cost = "Success"
|
||||
else:
|
||||
# Default behavior: run each file in a separate process (unchanged)
|
||||
max_workers = threads
|
||||
# Use single worker for estimate mode to prevent race conditions
|
||||
max_workers = 1 if self.estimate_only else threads
|
||||
self.executor = ThreadPoolExecutor(max_workers=max_workers)
|
||||
|
||||
# Submit tasks to run modules in separate processes
|
||||
|
|
|
|||
|
|
@ -178,7 +178,10 @@ files to translate are in the /files folder and that you picked the right game e
|
|||
pass
|
||||
except Exception:
|
||||
pass
|
||||
with ThreadPoolExecutor(max_workers=THREADS) as executor:
|
||||
|
||||
# Use single worker for estimate mode to prevent race conditions
|
||||
max_workers = 1 if estimate else THREADS
|
||||
with ThreadPoolExecutor(max_workers=max_workers) as executor:
|
||||
futures = []
|
||||
files_root = "files"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue