Repository navigation
refactor: QML GUI stack [Part 5] -> Dissolve runs in own thread + concurrent messaging and notifications - #2622
Open
RobBuchananCompPhys wants to merge 2 commits into
Open
RobBuchananCompPhys wants to merge 2 commits into
RobBuchananCompPhys wants to merge 2 commits into
Conversation
RobBuchananCompPhys
added this pull request to stack #2609
September 25, 2026 15:04
RobBuchananCompPhys
force-pushed
the
dissolve2/gui2-stack/part-5-dissolve-thread
branch
from
September 25, 2026 15:15
678eeb3 to
549aa3c
Compare
RobBuchananCompPhys
force-pushed
the
dissolve2/gui2-stack/part-5-dissolve-thread
branch
from
October 5, 2026 12:07
549aa3c to
04a8994
Compare
RobBuchananCompPhys
force-pushed
the
dissolve2/gui2-stack/part-5-dissolve-thread
branch
from
October 6, 2026 14:29
2ae78d6 to
21e7f48
Compare
Base automatically changed from
dissolve2/gui2-stack/part-4-qml-dev-phase2
to
develop2
October 7, 2026 09:51
RobBuchananCompPhys
force-pushed
the
dissolve2/gui2-stack/part-5-dissolve-thread
branch
2 times, most recently
from
October 7, 2026 14:04
9ce66c0 to
c7bf272
Compare
RobBuchananCompPhys
marked this pull request as ready for review
October 8, 2026 09:43
RobBuchananCompPhys
force-pushed
the
dissolve2/gui2-stack/part-5-dissolve-thread
branch
from
October 8, 2026 09:44
ab7b338 to
ebde573
Compare
This branch has not been deployed
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 work aims to run the Dissolve graph in its own thread, alleviating the GUI to be used as normal while the graph runs. The mechanisms to do this are pretty straightforward. We spin up a new thread using the
QThreadclass, and run the graph inside it.The trickier bit has been live monitoring of the graph's progress. This has been done via a
processComplete_member on everyNode, astd::optional<bool>allowing for the resolution of three possible states:false= process started,true= process finished, and the default, uninitialised state = 'not yet run'.This state is sampled across all nodes by their respective
NodeMessagesobject, at 250 ms intervals, and this fundamentally determines the notification state that the user sees for each node. Running a node resets the state, and running a node that is itself aGraphresets all the progress trackers within the graph.I've considered writing a unit test to test this behaviour, as the fact that this introduces a change to the back end
NodeandGraphseems to warrant a test case. However, I'm not really sure what the best way to test the mechanism is! In practice, it will throw a hard C++ runtime exception if any illogical behaviour should occur (i.e. if the progress tracker is in atrue- i.e. finished - state when we start running the node, or vice versa), so every graph we run during our unit tests in a way becomes an automatic test case for this. Since we are dealing with a private member, we can't really mutate it externally to try and force the wrong behaviour.Additionally, this system is principally of use to the UI notifications, and doesn't get called anywhere else, so I had considered wrapping the
Node::started()/Node::finished()calls inside a compiler-levelIF GUI etc..., but then realised that this progress might also be useful for reporting to some sort of console progress bar when running the CLI version too.