Repository navigation
Dynamic running sometimes doesn't update when UI inputs change #3
Copy link
Copy link
Closed
Description
Activity
Other potential solution: setting IsDirty to true kills current execution and the re-evals.
Pros: potentially faster, less likely to get garbage data, can rollback the transaction so document will never get updated.
Cons: could result in unexpected run issues and element states which are unaccounted for. With DMU might not be a problem, but still potential unexpected thread issues may arise.IsInteractive attribute can now come into use. If true, eval is wrapped in dispatcher. Entire eval needs to be wrapped (from checking if cancelled to setting IsDirty to false) in order to avoid race conditions. Once the eval cancellation flag is set, IsDirty can NOT be set to false before the evaluation actually stops.
- added a commit that references this issue
on Dec 15, 2014 - added a commit that references this issue
on Jun 23, 2015 - added a commit that references this issue
on Jan 30, 2018 - added a commit that references this issue
on Jan 11, 2019 - added a commit that references this issue
on Jun 30, 2020 - added a commit that references this issue
on Aug 18, 2021 - added a commit that references this issue
on Oct 26, 2021 - added a commit that references this issue
on Mar 14, 2023 - added a commit that references this issue
on Apr 5, 2023 - added a commit that references this issue
on May 23, 2023
Metadata
Metadata
Assignees
Labels
No labels
Happens often w/ sliders, less often with text boxes.
I think what's happening is a race condition between the UI thread and the evaluation thread. Evaluate thread fetches UI value, UI thread then updates the value, and then evaluate thread marks it as clean after using the old value.
Solution: wrap evaluate thread in UI dispatcher such that UI is fetched and marked clean in the UI thread. This way, the UI updates before the evaluation (and the latest value is fetched) or the old value is fetched and the node is marked clean before the change happens and it becomes dirty again (the queue will then rerun it to get the changes).