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
Example: lets say we have a counter that should count to 10 and every scroll event increases the counter by +1. If the counter state is greater or equal to 10, then our increase state handler does nothing. Now lets assume the counter state is at 9 and we scroll very fast, so that new scroll events get triggered and processed asyncronously (thats the important point), so that the event handler in foldp reads the old state value of 9 and increases it by one. Now we look at the counter and it shows 13, although we never expect it to be more than 10.
I'm not exactly sure if its possible to reproduce the problem with simple counters, the problem that i have is a ajax request plus list mappend, with too many requests and appends if i scroll too fast, but not so if i scroll slowly so that a new event reads the updated state.
How do i solve this problem?
The text was updated successfully, but these errors were encountered:
Example: lets say we have a counter that should count to 10 and every scroll event increases the counter by +1. If the counter state is greater or equal to 10, then our increase state handler does nothing. Now lets assume the counter state is at 9 and we scroll very fast, so that new scroll events get triggered and processed asyncronously (thats the important point), so that the event handler in foldp reads the old state value of 9 and increases it by one. Now we look at the counter and it shows 13, although we never expect it to be more than 10.
I'm not exactly sure if its possible to reproduce the problem with simple counters, the problem that i have is a ajax request plus list mappend, with too many requests and appends if i scroll too fast, but not so if i scroll slowly so that a new event reads the updated state.
How do i solve this problem?
The text was updated successfully, but these errors were encountered: