New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace IProcess.WaitForProcessExitAsync with WaitForExitAsync #10802
Conversation
/// <param name="token">An optional token to cancel the asynchronous operation.</param> | ||
/// <returns>A task that will complete when the process has exited, cancellation has been requested, or an error occurs.</returns> | ||
Task WaitForProcessExitAsync(CancellationToken token); | ||
/// <returns>A task that yields the process's exit code, or <c>null</c> if this object was disposed before the process exited.</returns> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
null
? This would be extremely unexpected.
Also, the signature is suggesting the result is non-nullable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've copied this from WaitForExitAsync(void)
- without checking. :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 modulo the comment
Artifacts for validation: https://ci.appveyor.com/project/gitextensions/gitextensions/builds/46515268/artifacts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seem to work fine for me, regarding minimization and normal use.
From what I see, the APIs are used OK.
Nice!
(RussKie comments remains, null annotation there?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
Note: I have seen this problem also in builds with this fix. However, the explicit Restore is done by window. Not reverting directly. The workaround #10398 (comment) |
After this change the problem occur less often, but often enough to be really irritating. |
I'm finding the same thing intermittently. It's definitely better, I can now click a second time and the window will restore. Before it would never restore. Maybe it's just a bad idea to start an external process while Windows is waiting on Git Extensions to process a WM_ACTIVATE request? |
I have a private patch to not run ls-files (to find if the repo status is changed externally) when activating, I still see the problem. |
I think we need to remove WM_ACTIVATE until we come up with a better solution rather than try to hack. |
Add an experimental setting to not run git-ls-files when the window is minimized on activation, as async commands when minimized seem to block the app from being restored. Rename configuration added in gitextensions#10119 to deactivate at upgrade as this setting may give a negative experience after gitextensions#10802 mostly fixes the problem.
Add an experimental setting to not run git-ls-files when the window is minimized on activation, as async commands when minimized seem to block the app from being restored. Rename configuration added in gitextensions#10119 to deactivate at upgrade as this setting may give a negative experience after gitextensions#10802 mostly fixes the problem.
Add an experimental setting to not run git-ls-files when the window is minimized on activation, as async commands when minimized seem to block the app from being restored. Rename configuration added in #10119 to deactivate at upgrade as this setting may give a negative experience after #10802 mostly fixes the problem.
Fixes #10398
Proposed changes
IProcess.WaitForProcessExitAsync
with cancellable variant ofWaitForExitAsync
as proposed by @vjdwScreenshots
N/A
Test methodology
Test environment(s)
Merge strategy
I agree that the maintainer squash merge this PR (if the commit message is clear).
✒️ I contribute this code under The Developer Certificate of Origin.