-
Notifications
You must be signed in to change notification settings - Fork 5
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
Example needed for getting results after logic in finished #2
Comments
By adding a callback, the user of the class can perform an operation when all processes complete. Alternatively, you can add an observer to the module node and get an event every time a process state changes. This is what the GUI does to update the status display.
I don't understand - what are |
Watch the modified test examples |
I'm still not following. Can you describe more specifically what you are trying to achieve and why it is not possible with the current master branch? If it helps, make a new branch and pull request with the specific suggested changes. |
The proposed change was to have logic.run() as blocking until everything finishes, then it outputs results after the
|
The following is a
|
Okay, I see. Well, as I said I don't really see a need for a blocking version. As I mentioned, you can observe the node to track progress, or provide the callback to perform an operation when the processes all complete. Do you have a use case that cannot be satisfied with the existing behavior? |
Most of my use cases require blocking, I have pushed some changes to add blocking functionality without making it the default. Also I have added the function I use for terminate (I have a progressbar with a cancel button). |
If you try to get data after logic.run(), you will realize it is executed regardless of the logic not being finished yet. One way handle this case you need to do this in the callback method, but it is extremely difficult to do this.
The other way is to use with sentences, the logic will no call exit until it finishes and the it will still be visible under context manager
The text was updated successfully, but these errors were encountered: