Repository navigation
move Applications End Task off the UI thread - #42
Merged
Merged
Conversation
EndTask can block in the target window's queue. Submit the selected window identities and the Ctrl force flag to a persistent single-flight worker, re-check the window before the call, and report only the first real failure on the existing completion path. Co-authored-by: jameslincn <jameslincn@outlook.sg>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5626afc40f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A second End Task click while one is running was merged with replace_pending, so the earlier selection never ran. Append each accepted command and run the queue in order, still re-checking the window before every EndTask. Co-authored-by: jameslincn <jameslincn@outlook.sg>
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.
Summary
Applications → End Task no longer calls
EndTaskon the UI thread. The click captures the selected window identities and the Ctrl force flag, then submits that batch to a persistentSingleFlightWorkercreated once beside the snapshot and icon workers.If another End Task is already running, each later click is appended and run in submission order. An accepted command is not replaced by a newer selection. The worker re-checks each window immediately before
EndTask: the HWND still exists, the thread id still matches, andProcIdentity(pid + creation time) still matches. A window that fails any check is skipped and is not treated as success. Ctrl+force stays with the command that captured it. When several windows are selected, each one runs, and only the first realEndTaskfailure is shown with the existing warning dialog.The page wakes through the existing
PWM_TASK_WORKER_COMPLETEmessage and drains this worker in the existing completion handler. Destroying the page drops the worker without joining it on the UI thread, so a blockedEndTaskcannot stall teardown and a late result is discarded.Test plan