You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"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.
The text was updated successfully, but these errors were encountered:
svetlyak40wt
changed the title
ui events race condition
UI events race condition
Jan 1, 2021
"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.
The text was updated successfully, but these errors were encountered: