Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. Additionally, make sure you've done all of these things:
[x] I've formatted my code according to Natron's code style
[x] I've searched the pull requests tracker to ensure that this PR is not a duplicate
PR Description
What type of PR is this? (Check one of the boxes below)
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Improvement (non-breaking change which does not add functionality nor fixes a bug but improves Natron in some way)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] My change requires a change to the documentation
[ ] I have updated the documentation accordingly
What does this pull request do?
Fixing GenericWatcher::scheduleBlockingTask() so that it actually holds the tasksMutex when it is pushing new task information.
Have you tested your changes (if applicable)? If so, how?
Yes. I basically just did simple tests that make sure when the function gets called everything still seems to work. I did not notice any problems caused by this change.
Futher details of this pull request
I suspect it could fix potential race conditions, but I didn't ever actually encounter any issues like that. I just happened to come across this code and realized that the queue was not being protected like the original author probably intended.
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. Additionally, make sure you've done all of these things:
PR Description
What type of PR is this? (Check one of the boxes below)
What does this pull request do?
Fixing GenericWatcher::scheduleBlockingTask() so that it actually holds the tasksMutex when it is pushing new task information.
Have you tested your changes (if applicable)? If so, how?
Yes. I basically just did simple tests that make sure when the function gets called everything still seems to work. I did not notice any problems caused by this change.
Futher details of this pull request
I suspect it could fix potential race conditions, but I didn't ever actually encounter any issues like that. I just happened to come across this code and realized that the queue was not being protected like the original author probably intended.