-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix #4260: Synchronize access to fileDialog.data file list #4279
Fix #4260: Synchronize access to fileDialog.data file list #4279
Conversation
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.
Thanks. I just left one simple comment inline :)
…ly create the mutex in all struct definitions
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.
Thanks. I am happy with this but would like someone with better knowledge of mutexes to have a look first :)
We've had some problems with some strange test failures in our CI workflow lately. I'll rerun and try to merge as soon as I can :) |
Thanks for all the reviews! |
Thank you for your work. It is much appreciated :) |
This change adds a RWMutex to synchronize access to the fileDialog.data file list. The refreshDir function clears and rebuilds fileDialog.data, meanwhile, several other functions are indexing into it. This allowed for scenarios where fileDialog.data was either nil or smaller than expected when indexing into it. Fixes #4260
Description:
This change adds a RWMutex to synchronize access to the
fileDialog.data
file list.The
refreshDir
function clears and rebuildsfileDialog.data
, meanwhile, several other functions are indexing into it.This allowed for scenarios where
fileDialog.data
was either nil or smaller than expected when indexing into it.Fixes #4260
Checklist: