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
20 KiB
20 KiB