Skip to content

CSSTUDIO-2412 Linear Meter bugfix: fix concurrency issue + improve performance#3018

Merged
abrahamwolk merged 6 commits into
masterfrom
CSSTUDIO-2412
May 20, 2024
Merged

CSSTUDIO-2412 Linear Meter bugfix: fix concurrency issue + improve performance#3018
abrahamwolk merged 6 commits into
masterfrom
CSSTUDIO-2412

Conversation

@abrahamwolk

Copy link
Copy Markdown
Collaborator

This PR fixes a concurrency issue in the Linear Meter: redrawIndicator() was called on different threads leading to exceptions being thrown. This PR changes the strategy for thread-safety: instead of using the synchronized keyword, relevant parts of the code are always run on the JavaFX application thread using the new helper function runOnJavaFXThread().

This PR also improves the performance of the Linear Meter widget in certain situations by avoiding unnecessary calls to setRange().

…lues when the observed min- and max-values have actually changed.
…n the JavaFX thread instead of using the "synchronized" keyword. This fixes a concurrency issue.
@abrahamwolk abrahamwolk requested a review from georgweiss May 16, 2024 11:47
@abrahamwolk abrahamwolk merged commit b424a86 into master May 20, 2024
@abrahamwolk abrahamwolk deleted the CSSTUDIO-2412 branch May 20, 2024 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants