Asynchronous nightmare #128544
Asynchronous nightmare
#128544
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Body
Hello, what could be the reason for inappropriate behavior of code that is asynchronous in nature? I constructed it in such a way that it creates a promise with an element with a time delay, so that when it ends, another one is created. In this way, I wanted to avoid a situation in which elements would be created at the same time, complicating the operation of the code and causing, for example, conflicts as a result of calling the same function. I usually have issues with asynchrony, it's always my nightmare and I have to spend a lot of time debugging and verifying where exactly the problem is. In this case, I also suspect asynchrony, since the code is designed logically to my eye.
The code I provided is slightly modified and differs slightly from the one in my project, but the main problem is that the code refers to the initial element, and not to each new element created.
I don't understand at all what any other reason could be.
https://jsfiddle.net/Ziggler/6s5y9ujx/17/
Guidelines
Beta Was this translation helpful? Give feedback.
All reactions