ticket #617: Shuffler Freeze Fix - #709
Open
ssshire wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket #617 — Shuffler: Async Processing & GUI Feedback Fix
Background
The Anonymize button in the File Shuffler tab was causing the main application window to hang,
blocking the GUI thread during the shuffler operation. The initial fix offloaded the work to a
background thread using
concurrent.futures.ThreadPoolExecutor, which resolved the freeze butintroduced a new problem — the GUI received no feedback during or after processing. Console log
output from
run_file_shuffler.pyandrun.shwas only visible in the terminal, neversurfacing back to the user.
Root Cause
The QML was expecting
run_file_shuffler_program()to return output synchronously and assign itdirectly to the
runLogdisplay property, but once async the function returned immediately withno meaningful output. The actual result from the background thread was only being
print()-edto terminal inside
handle_result(), never routed back to the UI.Fixed
Window dialogue no longer hangs; as per splitting the two processes
(ShufflerGUI) & (Anonymize Button)
Offloaded the Shuffler Button work by creating a worker thread pool to establish the
separation.
Modified the QML file to accept in
Connections(Signal) from the return statement in orderto print the status of the
run_shuffler_programoperation.Display console log pipes back to the Shuffler GUI instead of just terminal.