-
Notifications
You must be signed in to change notification settings - Fork 7
Spectrum Viewer: Prevent QThread from accessing Presenter data during runtime #2793
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
base: main
Are you sure you want to change the base?
Conversation
The kwargs for the
In the The only thing which is not local in |
Would it work to move all the chunk logic into |
20845ed
to
168cac9
Compare
168cac9
to
34b1b39
Compare
…ult to modify attributes during thread cleanup
…cations of presenter attributes
34b1b39
to
044d627
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
044d627
to
faf4a94
Compare
Issue Closes #2715
Description
The PR is to prevent the QThread in the Spectrum Viewer from changing data which may be accessed by different processes, while the QThread is running as this may lead to unreliable results due to a race condition. To achieve this, the function in the Worker Thread no longer directly accesses the attributes in the presenter, but instead takes them as arguments and outputs the altered attributes as
thread.result()
. The attributes in the presenter space are then changed during thethread_cleanup
instead of inside the thread itself.Also to make sure that nothing could be changed in the running of the thread, a
Lock()
is used inside the thread function.Developer Testing
python -m pytest -vs
Acceptance Criteria and Reviewer Testing
python -m pytest -vs