Skip to content
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

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

Merged
merged 6 commits into from
May 20, 2024

Conversation

abrahamwolk
Copy link
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 merged commit b424a86 into master May 20, 2024
2 checks passed
@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