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

Introducing UI update lock. #186

Merged
merged 11 commits into from
Aug 26, 2023
Merged

Introducing UI update lock. #186

merged 11 commits into from
Aug 26, 2023

Conversation

RobinTail
Copy link
Collaborator

Closes #184

@RobinTail RobinTail added the bug Something isn't working label Aug 16, 2023
@coveralls
Copy link

coveralls commented Aug 16, 2023

Coverage Status

coverage: 100.0%. remained the same when pulling 4629855 on ui-update-lock into 996f9ce on develop.

@RobinTail
Copy link
Collaborator Author

i don't like this approach, since the next call of this method can be caused by the most recent data state, while the payload for ongoing execution may already have been shaped. that can lead to missing the important updates. what is really required is an actual thread lock that awaits to be released.

yes, but this way it does not solve the original issue

@RobinTail
Copy link
Collaborator Author

Hey, girls, I have an idea — we should not call the UI update fn in the polling thread during the ongoing one caused by the main thread.
The simple bool should be enough.

@RobinTail
Copy link
Collaborator Author

Looks better.
It's always nice to talk to a smart person, thanks for stepping in.

@RobinTail
Copy link
Collaborator Author

RobinTail commented Aug 26, 2023

Now we can call the UI update fn wherever it's needed, without relying on the polling thread.
For instance — after calling the relay toggling fn.

@RobinTail RobinTail marked this pull request as ready for review August 26, 2023 14:57
Copy link
Collaborator Author

@RobinTail RobinTail left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@RobinTail RobinTail merged commit e6b1aeb into develop Aug 26, 2023
@RobinTail RobinTail mentioned this pull request Aug 26, 2023
@RobinTail RobinTail linked an issue Aug 26, 2023 that may be closed by this pull request
RobinTail added a commit that referenced this pull request Aug 26, 2023
@RobinTail RobinTail mentioned this pull request Aug 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI update can be triggered twice
2 participants