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

UI events race condition #8

Open
bamboospirit opened this issue Jan 1, 2021 · 0 comments
Open

UI events race condition #8

bamboospirit opened this issue Jan 1, 2021 · 0 comments

Comments

@bamboospirit
Copy link

"Click on the "render many" button and wait for it to finish rendering.
Then click again on "render many" and without delay click on "render few"
You will see that AFTER "render few" (the last action from the UI) has finished doing its work,
the results will be replaced by an older action from the UI ...
How to avoid this? In a filtering widget for example, typing a word fast will result in the wrong filtration of a long list.
(after if finishes rendering the newest results according to the last input word, it will then render the previous results from the previous UI action when
the word was only partially typed into the box) https://gist.github.com/bamboospirit/33f6b32f21db22fd48e3724648cf33dc
sbcl sometimes reports hash-table concurrent access error because make-js-action is called in render methods which are being executed concurrently"

This is a race condition and I can't imagine a good generic way to get rid of it because desired behaviour highly depends on application logic.
The correct way would be adding some sort of lock to serialize access to the widget from different actions. Also it might be a good idea to protect with locks other objects accessed from actions. But again, this depends on the application logic.

@svetlyak40wt svetlyak40wt changed the title ui events race condition UI events race condition Jan 1, 2021
@svetlyak40wt svetlyak40wt transferred this issue from 40ants/weblocks Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant