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

Fixed bugs caused by parallel access during multithreading #704

Closed
wants to merge 13 commits into from
Closed

Fixed bugs caused by parallel access during multithreading #704

wants to merge 13 commits into from

Conversation

TheJackiMonster
Copy link
Collaborator

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

Now the 'textEditView' should synchronize model and text thread safe without problems.
I just replaced the boolean with a QMutex for accurate synchronization.
@TheJackiMonster TheJackiMonster changed the title Replaced attribute '_updating' by a QMutex Fixed bugs caused by parallel access during multithreading Dec 4, 2019
@gedakc
Copy link
Collaborator

gedakc commented Dec 12, 2019

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.

@TheJackiMonster
Copy link
Collaborator Author

Yes, it should be complete. I will do that as soon as possible. ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants