Option to execute repl commands in a non-GUI thread#3130
Merged
j9ac9k merged 9 commits intopyqtgraph:masterfrom Oct 13, 2024
Merged
Option to execute repl commands in a non-GUI thread#3130j9ac9k merged 9 commits intopyqtgraph:masterfrom
j9ac9k merged 9 commits intopyqtgraph:masterfrom
Conversation
- init arg to enable checkbox - checkbox to enable non-gui execution - keep improved signal structure either way, just do not use the thread unless requested
Contributor
|
This seems like a nice addition, and will prevent friction that users encounter when typing the I encounter this issue often when testing (the first thing I think of is to try |
j9ac9k
added a commit
to j9ac9k/pyqtgraph
that referenced
this pull request
Mar 25, 2025
* first pass: implement threaded exec * disable input until the command is done executing * make non-gui behavior optional - init arg to enable checkbox - checkbox to enable non-gui execution - keep improved signal structure either way, just do not use the thread unless requested * add tooltip * import cleanup * unfreeze input after handling an exception * set focus, too * handle more exceptions; do the multiline thing --------- Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
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.
This allows application designers to offer their users command execution in either the GUI thread (the current default) or a non-GUI thread. Users may want this if their command is expected to run a long time, does not interact directly with any GUI elements, and they don't want the entire application to freeze for the duration. GUI execution is still the default, and the checkbox to control this isn't even shown without being explicitly configured, so all existing applications will be unchanged. I regret that this wasn't built very testably, The example henceforth uses it, so it will at least get instatiated during a test run.