-
Notifications
You must be signed in to change notification settings - Fork 225
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
Fixed bugs caused by parallel access during multithreading #704
Conversation
Now the 'textEditView' should synchronize model and text thread safe without problems.
Replaced attribute '_updating' by a QMutex
I just replaced the boolean with a QMutex for accurate synchronization.
Now the code is thread-safe as it should be but the original problem still occurs.
Thanks @TheJackiMonster for contributing a bug fix. There appear to be several commits in this pull request. Is this a work-in-progress or is this patch complete? If it is complete then it would help us if you rebase this merge request on the current develop branch, and also squash all the commits into one. Then when we have time we can review this PR. |
Yes, it should be complete. I will do that as soon as possible. ^^ |
Now the 'textEditView' should synchronize model and text thread safe without problems.
I just replaced the boolean with a QMutex for accurate synchronization.
Now the 'textEditView' should synchronize model and text thread safe without problems. The QMutex solves the causes of parallel access. I guess most people haven't got any problems because it is so rare. If I find similar pieces of code I will probably add Mutexes too.
Keep up the good work on this project!
Also here is some information I looked up to get the implementation right:
https://doc.qt.io/qtforpython/PySide2/QtCore/QMutex.html