Fix: Ensure blocking queues are local & cancel futures on early exit

The original code used class-level `BlockingQueue` instances (`queue0`, `queue1`) which caused issues when processing multiple files concurrently. Each comparison needed its *own* dedicated queues to avoid data corruption and incorrect comparisons between different file pairs. This commit creates the `BlockingQueue` instances locally within the file comparison loop.

Additionally, the futures submitted to the executor service were not always being cancelled if an exception occurred or the comparison finished before reaching the end of the files.  This could lead to lingering threads. The `finally` block now ensures that both futures are cancelled regardless of how the try block exits, preventing resource leaks and potential deadlocks.


git-svn-id: svn://home0/checkDataIntegrity@3745 71dcc7fd-b1f2-4e5d-bb8e-274146e81173
This commit is contained in:
(no author)
2025-06-20 11:49:38 +00:00
parent 2a1ff2b30a
commit d3134c05a5
3 changed files with 9 additions and 11 deletions

Binary file not shown.