Answer the question
In order to leave comments, you need to log in
How to disable concurrent function call?
How to prevent simultaneous execution of one asynchronous function? That is, there is an asynchronous function asyncFnc(data) {...};
If it is called and has not yet completed, how to prevent its call at this time, but put it in a queue and make sure that this call is executed, but after the first call has been processed?
Answer the question
In order to leave comments, you need to log in
Without promises, on old callbacks: https://codepen.io/anon/pen/jLQBNj?editors=0012
Creates a wrapper over the function, calls sequentially, the last argument is a mandatory callback.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question